Time of Update: 2015-06-13
標籤:三種得到LinearInflater的方法a. LayoutInflater inflater = getLayoutInflater();b. LayoutInflater localinflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); c. LayoutInflater inflater = LayoutInflater.from(context)
Time of Update: 2015-06-13
標籤:轉自 http://www.gisall.com/html/35/160435-5369.html1. reference:參考某一資源ID。 (1)屬性定義: <declare-styleable name =
Time of Update: 2015-06-13
標籤:轉載請註明地址:http://blog.csdn.net/ethan_xue/article/details/7313788ps: 可根據apidemo裡LableView,list4,list6學習文檔在dev guide/Framework Topics/User Interface/Building Custom Components 自訂控制項的步驟:1 View的工作原理 2 編寫View類 3 為View類增加屬性 4
Time of Update: 2015-06-13
標籤:onFinishInflate() 當View中所有的子控制項 均被映射成xml後觸發onMeasure(int, int) 確定所有子項目的大小onLayout(boolean, int, int, int, int) 當View分配所有的子項目的大小和位置時觸發onSizeChanged(int, int, int, int) 當view的大小發生變化時觸發onDraw(Canvas) view渲染內容的細節onKeyDown(int, KeyEvent)
Time of Update: 2015-06-13
標籤:構建自訂群組件Android中,你的應用程式程式與View類組件有著一種固定的聯絡,例如按鈕(Button)、文字框(TextView),可編輯文字框(EditText),列表框(ListView),複選框(CheckBox),單選框(RadioButton),捲軸(Gallery),微調器(Spinner),
Time of Update: 2015-06-13
標籤:轉載地址:http://blog.csdn.net/hyr83960944/article/details/37519299當你想在Android Studio中刪除某個module時,大家習慣性的做法都是選中要刪除的module,右鍵去找delete。但是在Android Studio中你選中module,右鍵會發現沒有delete,為什麼會沒有delete按鈕,不科學啊,難道是Android
Time of Update: 2015-06-13
標籤:如果你執行了從module列表中移除module的操作,但是沒有執行delete module檔案夾的操作,那如何恢複被移除掉的module呢。關於如何移除請戳這:Android Studio如何刪除module這種情境還是很多見的,比如我 移除了module app,但是後面我又想用這個module了,要恢複的話,很簡單,看,編輯settings.gradle即可,當然裡面的module名稱必須得 和你移除的module名稱要一致,編輯完了記得點sycn
Time of Update: 2015-06-13
標籤:書接上回 在xml裡建立屬性,然後java代碼裡用typedArray獲得這些屬性,得到屬性後,利用屬性做一些事.例:得到xml裡的color,賦給paint.1.在res/values/下建立attrs.xml [html] view
Time of Update: 2015-06-13
標籤:1: 擷取PackageManager 擷取全部靜態已安裝的應用:?1PackageManager pm = getPackageManager(); <br>List<PackageInfo> infos = pm.getInstalledPackages(0); <br><br>icon : info.applicationInfo.loadIcon(pm)<br>appName :
Time of Update: 2015-06-13
標籤:Garbage Collection is not supported 當Xcode編譯Mac OSX App時報錯:"Garbage Collection is not supported" 的解決辦法:1. 不需要遷移到ARC仍然可以編譯通過"If your project is imported from Xcode 3.x and you want to use ARC, you will have the following error at compile
Time of Update: 2015-06-13
標籤:啟動Activity源碼:(記得要加上Intent.FLAG_ACTIVITY_NEW_TASK)Intent intent = new Intent();intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setClass(getApplicationContext(),FileBrowserActivity.class);startActivity(intent);原因:如果一個外部的Activity
Time of Update: 2015-06-13
標籤:Eclipse有一個很好的功能,就是當你代碼調用某個android API時,滑鼠移到對應的函數或者方法上,就會自動有一個懸浮窗提示該函數的說明(所包含的參數含義,該方法功能)。遷移到Android Studio後,這個滑鼠移到函數上,你發現懸浮窗不出來了,各種不習慣啊。那在Android Studio到底如何查看函數的說明呢。選中你要查看的函數,比如我要查看底下函數使用說明,先選中,然後按F2,嘎嘎,懸浮窗就出來了.[Android Studio] Android
Time of Update: 2015-06-13
標籤:轉載自:http://blog.csdn.net/hyr83960944/article/details/38067499在Eclipse中有一個很好的功能,就是比如我開啟一個AActivity,左邊的Project中,會自動的定位到當前檔案所在的目錄。但是在Android Studio中不會自動定位了。那在Android
Time of Update: 2015-06-13
標籤:http://blog.memecodes.com/340.html 在http串連中,會存在著cookie狀態,需要訪問登入後的網頁,就必須儲存用於認證的cookie;之後每次發送請求,將儲存的cookie一併帶上便可實現登入後訪問。開發中,一般都會使用組件、架構、平台等方式來進行快速開發,本文將介紹使用Xutils架構如何來儲存cookie。使用Xutils儲存cookie1HttpUtils
Time of Update: 2015-06-13
標籤:SimPholder2.app 官網:http://www.simpholders.com?當使用 Xcode beta 版本切換到 Xcode 正式版本時,點擊 SimPholders2.app 安裝,提示 “Xcode is not installed” ,原因是 app 安裝時去驗證 Xcode 路徑下是否存在,這裡由於安裝的是 Xcode.app,所以路徑應該更改;開啟 shell 終端,輸入如下命令:1 sudo
Time of Update: 2015-06-13
標籤:轉載: http://xuyazhou.com/archives/461 http://relex.me/using-manifestplaceholders/最近一直用android
Time of Update: 2015-06-13
標籤:參考: http://www.cnblogs.com/0616--ataozhijia/p/4094952.html以API 19為例:系統預設提供的 android.jar整體大小為: 21.8 MB 手動刪除資源檔後, android.jar大小為: 2.6 MB從中可以確定: jar包中是可以放入資源檔的那麼 jar包中的資源是如何被調用的?? 以純java方式: 見參考以Android方式:
Time of Update: 2015-06-13
標籤:轉載:http://blog.csdn.net/hyr83960944/article/details/38067785Android
Time of Update: 2015-06-13
標籤:android的2.3 之後引入的StrictMode 對網路的訪問做了限制啊。public void onCreate() { if (DEVELOPER_MODE) { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskReads() .detectDiskWrites()
Time of Update: 2015-06-13
標籤: 由於Appium的學習需要安裝一些手機應用來進行測試,我在這裡簡單介紹下安卓模擬器中應用程式的安裝與卸載。 首先需要下載需要測試的應用程式APK檔案,這裡以YY語音為例,下載後將APK檔案放在%ANDROID_HOME%\platform-tools目錄下。 然後開啟安卓模擬器,開啟命令提示字元,進入%ANDROID_HOME%\platform-tools目錄下,輸入命令“adb install