Android code piecesπŸ“±πŸ’»
23 subscribers
39 photos
3 videos
6 links
Sample and useful code pieces and tricks for Android and Kotlin
Download Telegram
The
OnBackPressedDispatcher
controls how Back button events are dispatched to one or more
OnBackPressedCallback
objects.

https://developer.android.com/reference/androidx/activity/OnBackPressedCallback
In Kotlin a "receiver" is the instance on which an extension function is defined, or the type for a lambda with receiver.

https://kotlinlang.org/docs/reference/annotations.html
If you want to iterate over all the entries of a known enum class, you can use the β€˜.values()’ function. If you are working with generic enums, you can use the β€˜enumValues()’ function instead.
JetPack Compose has a very strange
way of describing columns and rows.