Android Weekly Issue #502
Fixing simpleperf broken records
Simpleperf is a native CPU profiling tool for Android.
It can be used to profile both Android applications and native processes running on Android.
It can profile both Java and C++ code on Android.
Non-fatal crashes: the crash rate that matters
非crash的錯(cuò)誤其實(shí)也很影響用戶體驗(yàn).
A Tale of Two Composable Default Text Sizes
-
ClickableText
來自于Compose Fundations. -
Text
來自于Compose Material.
它們倆的字體大小的默認(rèn)值是不同的, 文章對比了它們字體大小在代碼中的來源.
REMEMBER, REMEMBER, JETPACK COMPOSE
作者主張慎用remember
.
-
remember
不能處理屏幕旋轉(zhuǎn), 要用rememberSaveable
. - 用
rememberSaveable
要寫Saver, 數(shù)據(jù)太大的話要持久化.
App widgets in Android with Glance
Sample: https://github.com/husaynhakeem/android-playground/tree/master/GlanceSample
用的是官方api: https://developer.android.com/jetpack/androidx/releases/glance
是2021年底才發(fā)布的:
https://android-developers.googleblog.com/2021/12/announcing-jetpack-glance-alpha-for-app.html
Introduction to Jetpack DataStore
Data Store的介紹. 和SharedPreferences的對比, 和Room的對比.
Jetnews for every screen
JetNews的多屏幕適配.
Authenticating on Android with the AppAuth Library
AppAuth Library: https://github.com/openid/AppAuth-Android
解釋了原理(有圖)并且有詳盡的例子.
Idea to Game in 24 hours with Firebase
受到Wordle的啟發(fā), 作者在24小時(shí)內(nèi)實(shí)現(xiàn)了: https://pictle.web.app/
另外作者分享了一些他的side projects經(jīng)驗(yàn).
還有他用到的工具.
Choosing the Right Transitions
關(guān)于動畫的用戶調(diào)研.
Automate library publishing with GitHub Actions
用GitHub Actions做CI, 可以存環(huán)境變量, 發(fā)布庫.
Becoming a Better Writer as a Software Engineer
如何提高技術(shù)寫作.
5-15 updates. 這個(gè)主意不錯(cuò)唉. 花15分鐘寫一個(gè)別人5分鐘就能讀完的東西.
后面還有一些課程和學(xué)習(xí)資源.
Develop a Password Strength Calculator Application for Android
一個(gè)密碼強(qiáng)度計(jì)算器.
Navigating in Compose: Criteria
如何在多種navigaion方案中做出選擇.
這篇文章討論了一些判斷標(biāo)準(zhǔn).
Code
- https://github.com/akshay2211/DrawBox
- https://github.com/boguszpawlowski/Chassis 一個(gè)validation的小庫, 感覺寫起來也不是很簡潔.
- https://github.com/microsoft/surface-duo-compose-sdk/tree/main/WindowState
Video
- Kotlin doc: Dokka: https://www.youtube.com/watch?v=GesMbOt5hIo