摘要: Android系統中Looper負責管理線程的消息隊列和消息循環,具體實現請參考Looper的源碼。 可以通過Loop.myLooper()得到當前線程的Looper對象,通過Loop.getMainLooper()可以獲得當前進程的主線程的Looper對象。
閱讀全文
摘要: The list below defines some of the basic terminology of the Android platform.
.apk file
Android application package file. Each Android application is compiled and packaged in a single file that includes all of the application's code (.dex files), resources, assets, and manifest file. The application package file can have any name but must use the .apk extension. For example: myExampleAppname.apk. For convenience, an application package file is often referred to as an ".apk".
Re
閱讀全文
摘要: C.__init__(self[, arg1, ...] )
Constructor (with any optional arguments)
C.__new__(self[, arg1, ...] )[a]
Constructor (with any optional argu ments); usually used for setting up subclassing of immutable data types
C.__del__(self)
Destructor
C.__str__(self)
Printable string representation; str() built-in and print statement
C.__repr__(self)
Evaluatable string representation; repr() built-in and '' operator
閱讀全文
摘要: 本來這是個老生常談的問題,上周自成又分享了一些性能優化的建議,我這里再做一個全面的Tips整理,謹作為查閱型的文檔,不妥之處,還請指正;
如果你已經對yahoo這些優化建議爛熟于心,果斷點這里
閱讀全文
摘要: 一、ASE(Android Scripting Environment)為Android系統帶來了腳本語言的技術,通過它我們可以編輯和執行腳本,和腳本解釋交互。腳本可以訪問多數Android API,目前有一個開源項目叫做Scripting Layer for Android (SL4A) ,提供了對python,javaScript, Lua等腳本的支持。ASE主要通過兩種方式來訪問 Android API,一種是通過JSON-RPC來訪問,另外一種通過BeanShell(Java語言的動態版本)直接訪問Android API。SL4AL架構如下圖:
閱讀全文