Time of Update: 2018-12-05
MPEG4Writer.cpp void MPEG4Writer::writeCompositionMatrix(int degrees)MPEG4Extractor.cppstatus_t MPEG4Extractor::parseTrackHeader(off64_t data_offset, off64_t data_size) { ...... uint32_t rotationDegrees; static const int32_t kFixedOne = 0x10
Time of Update: 2018-12-05
1. 通過intent來傳遞:activity1中設定: A.傳字元等: Java代碼 String text = "hello"; Intent intent1 = new Intent(ActivityMain.this, Activity2.class); intent1.putExtra("activity1", text); startActivity(intent1); B.
Time of Update: 2018-12-05
檔案:frameworks/base/core/java/android/widget/MediaController.java private View.OnClickListener mRewListener = new View.OnClickListener() { public void onClick(View v) { int pos = mPlayer.getCurrentPosition(); pos -= 50
Time of Update: 2018-12-05
在 android 的API中有提供 SystemClock.setCurrentTimeMillis()函數來修改系統時間,可惜無論你怎麼調用這個函數都是沒用的,無論模擬器還是真機,在logcat中總會得到"Unable to open alarm driver: Permission denied ".這個函數需要root許可權或者運行與系統進程中才可以用。 本來以為就沒有辦法在應用程式這一層改系統時間了,後來在網上搜了好久,知道這個目的還是可以達到的。
Time of Update: 2018-12-05
開機初始化會在對應的init.rc中增加如下一行:setprop dalvik.vm.heapsize 48m。 ActivityManager.java (android/frameworks/base/core/java/android/app): String vmHeapSize = SystemProperties.get("dalvik.vm.heapsize", "16m");AndroidRuntime.cpp
Time of Update: 2018-12-05
Steps to generate iperf running on Android1. download iperf source from sourceforge.net,http://sourceforge.net/projects/iperf/2. download toolchain from codesourcery,http://www.codesourcery.com/sgpp/lite/arm/portal/release6443. enter iperf source
Time of Update: 2018-12-05
public class MyActivityManager extends ExpandableListActivity { private static final String NAME = "NAME"; private static final String NO_USED = "NO_USED"; private String[] groups = { "showRecentTask", "showRunningTasks",
Time of Update: 2018-12-05
稍微翻譯理一理,這裡主要是說IntentService使用隊列的方式將請求的Intent排入佇列,然後開啟一個worker thread(線程)來處理隊列中的Intent,對於非同步startService請求,IntentService會處理完成一個之後再處理第二個,每一個請求都會在一個單獨的worker
Time of Update: 2018-12-05
判斷android裝置當前設定的為什麼語言使用Locale類中getLanguage()方法;一般擷取到的比如中文為zh,英文為en,日文為ko;要獲得具體的類別使用toString()方法。比如繁體為zh_TW,簡體為zh_CN。英文中有en_GB;日文有ko_KR。 代碼如下:Locale.getDefault().getLanguage();Locale.getDefault().toString()
Time of Update: 2018-12-05
1 Notification notification = new Notification(com.android.internal.R.drawable.stat_sys_warning,"notification.",System.currentTimeMillis()); 2 notification.defaults = Notification.DEFAULT_SOUND; 3
Time of Update: 2018-12-05
Android PNG漸層背景圖片失真問題 2011-08-02 14:11:17| 分類: android 繪圖|字型大小 訂閱最近一個困擾很久的問題,漸層效果的png圖片,設定為控制項圖片或background時,在eclipse上看著沒有什麼問題,但是在裝置上運行時,可以看到明顯的一圈圈的輪廓線,圖片嚴重失真。在網上google了一下似乎這個問題很多人遇到,找到一種解釋是Android裝置display預設是採用16-bits color
Time of Update: 2018-12-05
adb install 時出現幾個異常打出來記錄一下 Java代碼 Failure [INSTALL_FAILED_DEXOPT] Java代碼 Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES] 這樣的問題主要是簽名衝突造成的,比如你使用了ADB的debug許可權簽名,但後來使用標準sign簽名後再安裝同一個檔案會出現這樣的錯誤提示,解決的方法除了只有先老老實實從手機上卸載原有版本再進行安裝,而adb install
Time of Update: 2018-12-05
Android應用開發——TextView控制項屬性列表android:autoLink設定是否當文本為URL連結/email/電話號碼/map時,文本顯示為可點擊的連結。可選值(none/web/email/phone/map/all)android:autoText如果設定,將自動執行輸入值的拼字糾正。此處無效果,在顯示IME並輸入的時候起作用。android:bufferType指定getText()方式取得的文本類別。選項editable
Time of Update: 2018-12-05
最近為瞭解決某個bug,textview中內容過長的話自動換行,但是調用measureText函數時發現傳回值很不準確,單位也不確定,是pixel還是dip,都不準。後來想起textview中有個內容過長加省略符號的屬性,即ellipsize,可以較偷懶地解決這個問題,哈哈~用法如下:在xml中android:ellipsize = "end" 省略符號在結尾android:ellipsize = "start" 省略符號在開頭android:ellipsize = "middle"
Time of Update: 2018-12-05
Android有四種方式:SharePreference輕量級鍵-值方式儲存,以XML檔案方式儲存。檔案採用java.io.*庫所提供有I/O介面,讀寫檔案。SQLit資料庫SQLite是輕量級嵌入式內建資料庫。ContentProviderContentProvider可為資料封裝,為多個應用共用 建立 SharePreference SharedPreferences settings = this.getSharedPreferences("TestXML", 0);
Time of Update: 2018-12-05
from :http://blog.csdn.net/maxleng/article/details/5490770 IPC架構分析 Binder,Service,Service manager
Time of Update: 2018-12-05
android Immutable bitmap passed to Canvas constructor異常2011-09-21 20:33 40人閱讀 評論(0) 收藏 舉報出現Immutable bitmap passed to Canvas constructor錯誤的原因是如果不用copy的方法,直接引用會對資源檔進行修改,而android是不允許在代碼裡修改res檔案裡的圖片解決辦法如下:使用view
Time of Update: 2018-12-05
from
Time of Update: 2018-12-05
* 1 在AndroidManifest檔案中加入sdcard操作許可權 * <!--在SDCard中建立與刪除檔案許可權 --> * <uses-permissioandroid:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/> * <!--往SDCard寫入資料許可權 --> *
Time of Update: 2018-12-05
from