Time of Update: 2017-02-28
本次我們主要講解Android平台下的各種Drawable,這裡在SDK的android.graphics.drawable包下面可以看到有各種Drawable類多達十幾種,它們到底之間有什麼關係和區別呢? 一、AnimationDrawable 顧名思義該類主要表示動畫的圖形類,可以實現逐幀播放的效果,下面程式碼範例如下 1. 定義一個cwj_animation.xml 放到res/drawable
Time of Update: 2017-02-28
文/姚冬 通過對Android產業開發的簡要分析,總結了Android系統開發中遇到的各種問題,從產品組合、需求管理、建模與重用、協同開發等角度分析和總結出能夠加速Android系統開發並有效提高產品品質的方法和思路。最後在此基礎上,提出了Android系統開發平台的解決方案,並結合整個產品生命週期,對Android系統開發中的各個環節加以表述。 經過多年的發展,Android已不是最初設想的僅僅作為行動裝置的平台,它提供了一個跨裝置的通用結構,並且開始進入其他數字消費裝置領域,諸如平板
Time of Update: 2017-02-28
//音效的音量 int streamVolume; //定義SoundPool 對象 private SoundPool soundPool; //定義HASH表 private HashMap<Integer, Integer> soundPoolMap; /*************************************************************** * Function: initSounds(); * Parameters:
Time of Update: 2017-02-28
Android實現Activities之間進行資料傳遞的方法 本文執行個體講述了Android實現Activities之間進行資料傳遞的方法。分享給大家供大家參考。具體分析如下: 首先,先說明一下Activity的啟動及關閉: 1. startActivity(Intent intent); 啟動Activity finish(); 結束當前Activity 2. startActivityForResult(Intent intent, int
Time of Update: 2017-02-28
/system/app/AccountAndAyncSettings.apk帳戶和同步設定 /system/app/AlarmClock.apk 鬧鐘 /system/app/ApplicationsProvider.apk 應用程式儲存 /system/app/AtCmd.apk AT命令 /system/app/AudioEffect.apk 音效 /system/app/BarCode.apk 條碼掃描&
Time of Update: 2017-02-28
private void storeInSD(Bitmap bitmap1) { File file = new File(FILE_DIR); if (!file.exists()) { file.mkdir(); } File imageFile = new File(file, FileUtils.getFileName() + ".png"); try { imageFile.createNewFile(); FileOutputStream fos =
Time of Update: 2017-05-27
Android開發筆記(10)——使用Fragment傳遞,androidfragment轉載請註明:http://www.cnblogs.com/igoslly/p/6911165.html 由於最近廢寢忘食地在開發App,沒來得及及時做總結,沒有用很進階的組件,勉強也使用一些功能完成了自己的第一個App,撒花~~~接下來都是自己在開發中使用後的一些經驗,也是和他人學習實踐後的成果,主要是關於Fragment。/* 添加Fragment有靜態添加 & 動態添加兩種方式 *
Time of Update: 2017-05-25
Android中SimpleAdapter的使用—自訂欄表,自訂simpleadapter本人初學Android,今天研究到Adapter這塊感覺挺有意思的,寫了個自訂欄表進行測試 首先我們建立一個layout列表布局檔案,具體布局可以自己設定。下面貼上我的自訂布局檔案代碼 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout
Time of Update: 2017-05-24
滑動關閉activity,滑動activity對於滑動關閉activity的功能,我一直覺得挺酷,想在自己的項目上也加上這個功能。網上找了一下發現一個不錯的思路。使用ViewDragHelper。首先要讓activity在滑動的時候下面的activity能夠看得到,那麼就得設定activity的主題,讓activity的視窗變透明。<style name="MyActivityBackground" parent="MyAppTheme"> <item name=
Time of Update: 2017-05-25
android入門,看這一本書就夠了,android入門,本書被Android開發人員譽為Android學習經典。全書系統全面、循序漸進地介紹了Android軟體開發的知識、經驗和技巧。 第2版基於Android7.0對第1版進行了全面更新,將所有知識點都在新的Android系統上進行重新適配,使用全新的Android Studio開發工具代替之前的Eclipse,並添加了對Material Design、運行時許可權、Gradle、RecyclerView、百分比布局、OkHttp、
Time of Update: 2017-05-20
TextView 實現跑馬燈效果,textview實現跑馬燈在String.xml中添加:<string name="txt">跑馬燈效果,我跑啊跑</string>在layout/mian.xml中添加TextView:<TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content"
Time of Update: 2017-05-19
菜鳥新聞1--自訂VideoView實現歡迎頁面,1--videoview1.自訂VideoView 實現全屏播放public class CustomVideoView extends VideoView { public CustomVideoView(Context context) { super(context); } public CustomVideoView(Context context, AttributeSet attrs) {
Time of Update: 2017-04-20
對View的onMeasure()方法的進一步研究,viewonmeasure在Android開發中,很多人對自訂View是望而生畏,但這又是向進階進階的必經之路,主要是對View裡面的很多方法不知道怎麼理解,其中一個就是onMeasure()方法。首先,我自訂一個MyView,繼承於View,onMeasure()方法不做處理,直接調用super.onMeasure(widthMeasureSpec, heightMeasureSpec);public class MyView
Time of Update: 2017-04-02
Lambda運算式在Kotlin中怎樣工作的:setOnClickListener的轉換(KAD 18),180作者:Antonio Leiva時間:Mar 28,
Time of Update: 2017-03-30
使用phonegap播放音頻,phonegap播放音頻<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Compass Example</title><script type="text/javascript" charset="UTF-8" src="cordova.js"></script><script
Time of Update: 2017-03-29
安卓開源項目周報0329,安卓開源項目0329由OpenDigg 出品的安卓開源項目周報第十四期來啦。我們的安卓開源周報集合了OpenDigg一周來新收錄的優質的安卓開源項目,方便安卓開發人員便捷的找到自己需要的項目工具。android-PictureInPicture 示範手持功能畫中畫模式AppMethodOrder 瞭解所有函數調用順序AutoplayVideos 輕鬆實現帶有視頻的RecyclerViewAndroid-DragDismissAct
Time of Update: 2017-03-25
Android系統架構,android系統結構1.應用程式
Time of Update: 2017-03-24
Android之上下文context,androidcontextContext,中文直譯為“上下文”,SDK中對其說明如下: 1、它描述的是一個應用程式環境的資訊,即上下文。 2、該類是一個抽象(abstract
Time of Update: 2017-03-13
View的measure機制,Viewmeasure機制Android中View架構的工作機制中,主要有三個過程: 1、View樹的測量(measure)Android View架構的measure機制 2、View樹的布局(layout) Android
Time of Update: 2017-03-13
View的事件分發機制,View事件分發機制一.Android View架構提供了3個對事件的主要操作概念文件。 1、事件的分發機制,dispatchTouchEvent。主要是parent根據觸摸事件的產生位置,以及child是否願意負責處理該系列事件等狀態,向其child分發事件的機制。