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
网友评论