07 2011 檔案
摘要: Android系統(tǒng)中Looper負(fù)責(zé)管理線程的消息隊(duì)列和消息循環(huán),具體實(shí)現(xiàn)請(qǐng)參考Looper的源碼。 可以通過(guò)Loop.myLooper()得到當(dāng)前線程的Looper對(duì)象,通過(guò)Loop.getMainLooper()可以獲得當(dāng)前進(jìn)程的主線程的Looper對(duì)象。
閱讀全文
摘要: 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
閱讀全文
摘要: 本來(lái)這是個(gè)老生常談的問(wèn)題,上周自成又分享了一些性能優(yōu)化的建議,我這里再做一個(gè)全面的Tips整理,謹(jǐn)作為查閱型的文檔,不妥之處,還請(qǐng)指正;
如果你已經(jīng)對(duì)yahoo這些優(yōu)化建議爛熟于心,果斷點(diǎn)這里
閱讀全文
摘要: 一、ASE(Android Scripting Environment)為Android系統(tǒng)帶來(lái)了腳本語(yǔ)言的技術(shù),通過(guò)它我們可以編輯和執(zhí)行腳本,和腳本解釋交互。腳本可以訪問(wèn)多數(shù)Android API,目前有一個(gè)開(kāi)源項(xiàng)目叫做Scripting Layer for Android (SL4A) ,提供了對(duì)python,javaScript, Lua等腳本的支持。ASE主要通過(guò)兩種方式來(lái)訪問(wèn) Android API,一種是通過(guò)JSON-RPC來(lái)訪問(wèn),另外一種通過(guò)BeanShell(Java語(yǔ)言的動(dòng)態(tài)版本)直接訪問(wèn)Android API。SL4AL架構(gòu)如下圖:
閱讀全文