The
https://developer.android.com/reference/androidx/activity/OnBackPressedCallback
OnBackPressedDispatchercontrols how Back button events are dispatched to one or more
OnBackPressedCallbackobjects.
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
https://kotlinlang.org/docs/reference/annotations.html
This media is not supported in your browser
VIEW IN TELEGRAM
We are finally getting the ability to animate Lazy list's item position changes in #JetpackCompose just like we did with DiffUtil π
The Modifier API called `Modifier.animateItemPlacement()` was implemented and merged and will probably be released in an upcoming Compose version.
The Modifier API called `Modifier.animateItemPlacement()` was implemented and merged and will probably be released in an upcoming Compose version.
Explain the difference between Cold Flow and Hot Flow with an example.
Cold Flow π₯Ά
β‘οΈ A cold flow is a data flow that produces values only when there is an active collector.
β‘οΈ Each collector receives the emitted values independently, and they start receiving emissions from the beginning when they subscribe.
β‘οΈ If we subscribe to a cold flow, we will receive all of the emitted values, even if the flow has already completed emitting values.
β When to use?
β‘οΈ Cold flows are typically used for tasks that need to be performed only once, such as loading data from a database or fetching data from a remote server.
β‘οΈ Example
Flow (itself)
Cold Flow π₯Ά
β‘οΈ A cold flow is a data flow that produces values only when there is an active collector.
β‘οΈ Each collector receives the emitted values independently, and they start receiving emissions from the beginning when they subscribe.
β‘οΈ If we subscribe to a cold flow, we will receive all of the emitted values, even if the flow has already completed emitting values.
β When to use?
β‘οΈ Cold flows are typically used for tasks that need to be performed only once, such as loading data from a database or fetching data from a remote server.
β‘οΈ Example
Flow (itself)