Time of Update: 2018-12-05
轉自:http://embed.chinaitlab.com/J2ME/877029.html 最近在做Marvell的項目,碰到個耳機熱插拔的問題,所以順便看了下相關代碼,這裡來貢獻一下給大家。 我們這裡以PXA的代碼為例,整個架構比較的簡單清晰,上層是分別是HeadsetObserver.java以及HookSwitchObserver.java,
Time of Update: 2018-12-05
本文介紹在Android如何顯示2D映像1)使用XML,代碼如下 <ImageViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:src="@drawable/android"/>(代碼比較簡單,不做解析了!!) 2)繼承View根據public void setContentView (View view) ,建立一個繼承View的類,並重寫onDraw函數。代碼如下:
Time of Update: 2018-12-05
[選載]Google Android開發入門與實踐 本文介紹Android的體繫結構,Android應用程式的組成和Android應用的邏輯組成。 1.
Time of Update: 2018-12-05
這篇部落格用如下的結構來講解Service:1.先看一下Service是什麼。A Service is an application component that can perform long-running operations in the background and does not provide a user interface.Service
Time of Update: 2018-12-05
1.在manifest檔案中配置<instrumentation>: <instrumentation android:name="android.test.InstrumentationTestRunner"android:targetPackage="com.broadvision.proguard" /> 作為manifest 標籤的子標籤,android:targetPackage 就是自己下面步驟建立的測試類別(AndroidTestCase的子類)的包名。2
Time of Update: 2018-12-05
EditText hyperLinkEdittext=(EditText)findViewById(R.id.hyper_link_edittext);//EditText對象int index = hyperLinkEdittext.getSelectionStart();//擷取游標所在位置String text="I want to input str";//我想添加的字串(方法1):Editable editable =
Time of Update: 2018-12-05
1.ImageView 每隔100ms更換一張顯示圖片過程中出現OOM錯誤解決方案: BitmapDrawable bitmapDrawable = (BitmapDrawable) image.getDrawable(); // 如果圖片還未回收,先強制回收該圖片 if (bitmapDrawable != null && !bitmapDrawable.getBitmap().isRecycled()){
Time of Update: 2018-12-05
從前一直以為“replace into” 在sqlite3 中的功能和大型資料庫中的語句“IF NOT EXISTS(SELECT * FROM Book WHERE ….) THEN INSERT INTO ... ELSE UPDATE SET
Time of Update: 2018-12-05
兩個儲存格合并成一個儲存格顯示的效果如所示:如何?上面的效果:1.得到TableLayout。2.用第一步得到的TableLayout調用下面的方法: private void appendTable(TableLayout tableLayout) { int size = fileList.size(); int columnNum = 4; boolean isSpanCell = false; boolean startNewRow = true;
Time of Update: 2018-12-05
今年做公司項目的時候,自己做與File有關的那部分。需求如下: 如果是圖片就完全顯示出來,如果不是圖片就讓顯示預設的表徵圖。還有兩種不同的顯示方式,一種是tile view(瓦片樣式,就是一行可以有好幾個檔案,類似GridView,但是有的Item可以跨行),另一種就是list View.眾所周知,每一個Android APP
Time of Update: 2018-12-05
Time of Update: 2018-12-05
Android 控制項之TextView、EditView、CheckBox--學習筆記3(金海建)目的:通過一個登陸框,來學習TextView、EditView、CheckBox的使用建立一個工程,然後設計如下uiMain.xml layout代碼 <?xml version="1.0" encoding="utf-8"?><LinearLayout android:id="@+id/LinearLayout01"
Time of Update: 2018-12-05
Android
Time of Update: 2018-12-05
作者:金海建安裝Ubuntu Android應用程式開發環境需要如下幾個軟體Java開發包:JDK 1.5/1.6開發Integration Environment(IDE): Eclipse 3.4Android開發環境:ADTAndroid SDKAndroid SDK API一、安裝JDK 1.6方法一:在"系統" > "系統管理"> "新立得的軟體包管理",在搜尋中輸入JDK,點擊搜尋。可以搜尋到如的軟體包列表。點擊應用程式更新JDK。方法二:在“終端”中輸入sudo
Time of Update: 2018-12-05
編譯truecrypt for android作者:金海建Truecrypt介紹:TrueCrypt是一款免費開源的綠色虛擬加密盤加密軟體,不需要產生任何檔案即可在硬碟上建立虛擬磁碟,使用者可以按照盤符進行訪問,所有虛擬磁碟上的檔案都被自動加密,需要通過密碼來進行訪問。TrueCrypt提供多種密碼編譯演算法,包括:AES-256, Blowfish (448-bit key), CAST5, Serpent, Triple DES,
Time of Update: 2018-12-05
Android
Time of Update: 2018-12-05
Android 建立菜單。-學習筆記(金海建)建立菜單有兩種方式,一種用MenuInflater從資源中載入,另一種是動態建立。方法一、MenuInflater建立菜單用MenuInflater 來建立菜單,MenuInflater介面用來是執行個體化menu XML檔案到menu對象的。1. 建立一個TestControl的工程(該工程用於學習各個控制項)2. 在res目錄下建立menu,並在menu目錄下建立menu.xml <menu xmlns:android="http:/
Time of Update: 2018-12-05
windows 8
Time of Update: 2018-12-05
在開始閱讀這篇博文前,需要一點點java基礎的儲備知識 1.ReferenceQueue的作用,我上一篇博文有比較深入的講解。 2.簡單瞭解LRU演算法,我在這裡推薦兩篇快速瞭解並學習LRU演算法的博文連結:http://blog.csdn.net/Ackarlix/archive/2007/08/26/1759793.aspxhttp://liangwj72.iteye.com/blog/123856 直接上代碼 package
Time of Update: 2018-12-05
本文載自網路,第一種方法我一直用,別的,沒試過。方法一:ADB解鎖 點擊下載ADB解鎖工具必要條件:USB偵錯模式為開啟狀態(MIUI系統預設開啟)1、手機串連電腦,確定已安裝ADB驅動(方法:),解壓ADB工具包至C盤2、開啟cmd輸入 cd c:\adb(開啟adb所在目錄)3、接著輸入adb shell4、繼續輸入cd