All Blogs
singleTask launchMode in Android
With singleTask launchMode, only one instance of the Activity exists at a time. If it already exists, its Task is brought forward and it gets the new intent.
init block in Kotlin
The init block in Kotlin runs when an object is created, right after the primary constructor, and lets us write the initialization code that it cannot hold.
Companion object in Kotlin
A companion object in Kotlin lets us call a function or access a property using the class name, without creating an object, like static in Java.
lateinit vs lazy in Kotlin
In Kotlin, lateinit is used with var when we will initialize the variable later, whereas lazy is used with val to create the object only on its first access.
Infix notation in Kotlin
Infix notation in Kotlin lets us call a function without the dot and parentheses, so that the code looks much more like a natural language.
Open keyword in Kotlin
In Kotlin, classes, functions, and variables are final by default. We mark them with the open keyword to allow them to be inherited or overridden.
Dispatchers in Kotlin Coroutines
Dispatchers help Kotlin Coroutines decide the thread on which a task runs. The types are Dispatchers.Default, Dispatchers.IO, Dispatchers.Main, and Unconfined.
Mastering Flow API in Kotlin
Flow API in Kotlin is an asynchronous data stream that emits values to a collector and completes with or without an exception. Let's master it step by step.
How does the Android Image Loading library optimize memory usage?
Android Image Loading libraries like Glide optimize memory usage by downsampling, which means scaling the image down to the size that the view actually needs.