Creating SQLiteOpenHelper() instance does not call onCreate().This means memeber value for SQLiteDatabase cannot be lateinit on onCreate() and used in
This creates an instance of the binding class for the "Activity" to use.This creates an instance of the binding class for the "Fragment" to use.Inflat
Android Room is basically same as SQLiteDB but provides easier and convenient way to implement and use it.There's three parts of Android Room.Entity a
Go to Settings > Editor > Live Templates and create a new live template you want to add.I've added a new live template that auto completes a comment w
There are various difference between traditional Views and newly introduced Composable.Views required XML files representing layout and in code, we'd
Annotation which tells Compose compiler that annotated function is a UI converted from data.Since Composable UIs are functions, cannot retain its refe
Column : All of the item in the list is composed.LazyList : Only composes those on the screen.A vertical lazy list.item : Adds single itme to the list
MutableState Types supported Remember > ### remember scope Avoid modifying state outside remember scope. State Hoisting Place state in the lowest
StateFlow An observable flow that emits state to the collectors. collectAsStateWithLifecycle Collects state flow in life-cycle aware manner. Side-Ef
StateHolder Creating a stateHolder seperates states from the composable function and simplifies the code. Since state holder is a plain class, it can
Navigation 1. Create NavController 2. Create NavHost Compose use serializable object or class to define a route. Navigation graph is created with co
When prepopulated data is required so that the user does not see empty screen on start, there are several ways to achieve this.Android API provides wa
Insert data into the table if it doesn't exist.If it exists, update the data in the table.Just like in any database, It can be done using transaction
In many articles and youtube videos, I have stumbled upon many suggestions about best way to load data in viewmodel.As I started to do another side pr
Testing Android applications can be challenging, especially when dealing with components that rely on system resources, time functions, or coroutines.