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的錯誤其實也很影響用戶體驗.
A Tale of Two Composable Default Text Sizes
-
ClickableText
來自於Compose Fundations. -
Text
來自於Compose Material.
它們倆的字體大小的默認值是不同的, 文章對比了它們字體大小在代碼中的來源.
REMEMBER, REMEMBER, JETPACK COMPOSE
作者主張慎用remember
.
-
remember
不能處理屏幕旋轉, 要用rememberSaveable
. - 用
rememberSaveable
要寫Saver, 數據太大的話要持久化.
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年底才發佈的:
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的啓發, 作者在24小時內實現了: https://pictle.web.app/
另外作者分享了一些他的side projects經驗.
還有他用到的工具.
Choosing the Right Transitions
關於動畫的用戶調研.
Automate library publishing with GitHub Actions
用GitHub Actions做CI, 可以存環境變量, 發佈庫.
Becoming a Better Writer as a Software Engineer
如何提高技術寫作.
5-15 updates. 這個主意不錯唉. 花15分鐘寫一個別人5分鐘就能讀完的東西.
後面還有一些課程和學習資源.
Develop a Password Strength Calculator Application for Android
一個密碼強度計算器.
Navigating in Compose: Criteria
如何在多種navigaion方案中做出選擇.
這篇文章討論了一些判斷標準.
Code
- https://github.com/akshay2211/DrawBox
- https://github.com/boguszpawlowski/Chassis 一個validation的小庫, 感覺寫起來也不是很簡潔.
- https://github.com/microsoft/surface-duo-compose-sdk/tree/main/WindowState
Video
- Kotlin doc: Dokka: https://www.youtube.com/watch?v=GesMbOt5hIo