Android Weekly Notes #434 #435
2020-10-18 本文已影响0人
圣骑士wind
Android Weekly Issue #434
Busting Android performance myths
几个关于Android性能的谜题.
- Myth 1: Kotlin apps are bigger and slower than Java apps -> 不是.
- Myth 2: Getters and setters are expensive -> 不是.
- Myth 3: Lambdas are slower than inner classes -> 没有.
- Myth 4: Allocating objects is expensive, I should use pools -> 这个问题有点复杂, 取决于实际应用场景和实现.
- Myth 5: Profiling my debuggable app is fine -> debuggable的app没有经过优化, 你可能会把时间浪费在不需要优化的点上.
还有一些奇怪的事情:
- Strangeness 1: Multidex: Does it affect my app performance?
- Strangeness 2: Dead code
使用了这个工具:
https://developer.android.com/studio/profile/benchmark
Android Emulator in a CI environment
Android官方博客: https://android-developers.googleblog.com/2019/10/continuous-testing-with-new-android.html
开源了android emulator container:
https://github.com/google/android-emulator-container-scripts
除了部署还可以debug.
Android Weekly Issue #435
Android Sharesheet: Old Dog, New Tricks
分享弹框.
val share = Intent.createChooser(Intent().apply {
action = Intent.ACTION_SEND
putExtra(Intent.EXTRA_TEXT, "https://developer.android.com/training/sharing/")
// (Optional) Here we're setting the title of the content
putExtra(Intent.EXTRA_TITLE, "Introducing content previews")
// (Optional) Here we're passing a content URI to an image to be displayed
data = contentUri
flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
}, null)
startActivity(share)
Don’t argue with default arguments
关于Kotlin默认参数的实现讨论.
Kotlin Coroutines in Android Summary
协程相关知识点总结.
Paging Library for Android With Kotlin: Creating Infinite Lists
Paging Library的教程, 创建无限的list.
Accessing an Android app secret from GitHub Actions using Gradle
如何处理secrets.
原来Github的settings里面有secrets, github actions的workflow里可以访问到.
Using Github Actions to Automate Our Release Process
用Github Actions来自动化发布.
这里面的脚本还挺全.
可以自动更新changelog.
可以通知slack channel.