I made an account on Bluesky if you are over there!
Android Developer Relations - Compose
I made an account on Bluesky if you are over there!
@queencodemonkey this might be the nicest message I have ever received! Thank you for reaching out, it really means a lot. I'm glad they helped!
✨ Get your Android App Performance Score ✨
Take the app performance quiz to get your App Performance Score. Each score comes with actionable insights, evaluations and recommendations to improve your app's performance.
@steveroy rememberPagerState(pageCount = { dynamic logic goes here })
Just in case you haven't seen the Recomposition State in the AS Debugger yet:
UPDATE: Thanks @jacobras for letting me know this feature was introduced back in Hedgehog (November 2023). Not entirely sure how I missed it this whole time, but better late than never.
We are constantly bringing performance improvements to Jetpack Compose, and today's blog post shows how much faster the upcoming version is compared to a year ago: https://android-developers.googleblog.com/2024/05/whats-new-in-jetpack-compose-at-io-24.html
The graph shows the time to first pixel in our Jetsnack sample app across multiple versions of Compose (in milliseconds).
And more optimizations, like strong skipping on by default, are coming!
@saket PM?
Navigation 2.8.0-alpha08 is out with a full compile time type safe system based on Kotlin Serialization (yes, that means no more string routes!).
Check out my blog post for more details on how exactly this functionality works:
https://medium.com/androiddevelopers/navigation-compose-meet-type-safety-e081fb3cf2f8
@antal no, going forward the compiler will only be released from the Kotlin repository
@kiranrao maybe we have something even better for I/O! Or maybe we wanted people to have docs to try out the Kotlin 2.0 RC 😅
The Jetpack Compose compiler is moving to the Kotlin repository with the upcoming release of Kotlin 2.0!
There will be a matching Compose compiler with each Kotlin release, so you won't have to wait to upgrade the Kotlin version in your Compose app → https://goo.gle/3QnPCC8
I really should open this app more often. Good vibes
If you're interested in learning more about the upcoming strong skipping mode, you do not want to miss reading this https://medium.com/androiddevelopers/jetpack-compose-strong-skipping-mode-explained-cbdb2aa4b900
Great article by @bentrengrove
@gakisstylianos @zachklipp @saket it's still being decided what the best path forward is
@saket @gakisstylianos ideally you would be able to delegate to a modifier factory like `delegate(Modifier.padding(padding)` but right now that isn't possible and we haven't worked out a way to build that as an API without drawbacks. Our advice right now for that situation is just use a composable function to return your modifier rather than a composed modifier.
This is all a WIP and the reason composed isn't actually deprecated yet.
@saket @gakisstylianos this is really great feedback. Let me see what I can get into the next round of changes for the guide.
Regarding your second point, you are correct that you wouldn't be able to delegate that. We aren't happy with this part of the API and it is subject to much discussion about what to do. Just making the nodes public seems obvious, but that doubles (triples if you include the elements) the Modifier API surface.
@zachklipp anything + half a jar of chilli oil = perfection