Android Weekly Issue #461
Coordinating multiple view visibility with Flow and the combine operator
復(fù)雜的UI狀態(tài), 通過在ViewModel里combine flow來完成.
Improving Android DataBinding with Bindables library
用這個(gè)庫(kù): https://github.com/skydoves/bindables 來進(jìn)一步改善data binding的使用.
Scheduling Tasks With Android WorkManager
WorkManager的使用和測(cè)試.
Noisy Code ?? With Kotlin Scopes
kotlin的幾個(gè)scope方法, 可能會(huì)導(dǎo)致可讀性降低.
remember { mutableStateOf() } – A cheat sheet
Compose代碼中的:
var text by remember { mutableStateOf("") }
-
by
是Kotlin的delegated property. -
remember
在recompositions中保持一個(gè)值不變. (persists across recompositions). -
mutableStateOf
返回一個(gè)MutableState
.
Libraries & Code
- https://github.com/skydoves/bindables DataBinding的輔助類.
- https://github.com/arkivanov/composnake Compose Desktop做的貪吃蛇.
- https://github.com/slackhq/EitherNet Retrofit的返回類型包裝.
- https://github.com/SerjantArbuz/Scriptum 一個(gè)筆記本應(yīng)用