https://kotlinlang.org/docs/delegated-properties.html[https://kotlinlang.org/docs/deleg...
https://kotlinlang.org/docs/delegated-properties.html[https://kotlinlang.org/docs/deleg...
把函數(shù)的定義跟類定義一起寫在頭文件中,就是隱式的內(nèi)聯(lián)函數(shù):https://harttle.land/2015/08/28/effective-cpp-30.html[http...
生成debug build aar, so必須包含符號(hào)。 在gradle文件中,buildTypes config下添加doNotStrip: https://stackov...
Kotlin中,lamda只有一個(gè)參數(shù)時(shí),可以用默認(rèn)參數(shù)名稱it代替命名參數(shù)。所以下面兩種方式的代碼,含義是一樣的: ComponentActivity的viewModel方...
ViewModelScope.launch啟動(dòng)的協(xié)程是運(yùn)行在主線程的。 ComponentActivity會(huì)用Lifecycle注冊(cè)生命周期事件,當(dāng)Activity銷毀的時(shí)候...
默認(rèn)有4個(gè): Dispatchers.Default[https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutin...
launch: 非阻塞的,launch會(huì)創(chuàng)建一個(gè)CoroutineContext,但是內(nèi)部會(huì)直接執(zhí)行。runBlocking: 阻塞的,runBlocking會(huì)創(chuàng)建一個(gè)Cor...
https://stackoverflow.com/questions/47716961/how-to-tell-talkback-a-custom-view-is-bein...
官方文檔:https://developer.android.com/reference/androidx/customview/widget/ExploreByTouchH...
https://developer.android.com/studio/build/apk-analyzer#view_file_and_size_information ...
在下面的例子中,x=1; y=1; 會(huì)先被調(diào)用,然后才是int color = 0xFF00FF被調(diào)用。 https://docs.oracle.com/javase/spe...
ArrayMap的好處: 把Key的hashcode從小到大放在一個(gè)數(shù)組中,key/value pair放在另一個(gè)數(shù)組中,省內(nèi)存。ArrayMap的劣勢(shì): 查找/插入更慢一些...
功耗=電壓*電流。電壓一般變化不大,電流變化較大。目前一般手機(jī)的電池容量在4000mAh左右,亮屏?xí)r間大概5-6個(gè)小時(shí)。 PerfDog和Battery historian都...
來(lái)源: https://www.zcaijing.com/shijinglv/96417.html 從邏輯上,他們可以組成如下幾種形態(tài)組合: 1、低ROE,低PE,低PB。一...
[captures] (params) mutable-> type{...} //lambda 表達(dá)式的完整形式 在 lambda 表達(dá)式引出操作符[ ]里的“captur...
參考文章:https://yongjhih.gitbooks.io/feed/bolts-android.htmlhttps://wangchao.im/2016/09/07...
官方文檔: https://github.com/facebook/react-native/wiki/Building-from-source NDK不需要下載NDK 17...