Today we are going save some data in Realm database and fetch to show that in recycler view.
I have posted how to use recycler view with fewer lines of code. (anyone need can find that here)
This guide is intended for newbies. Realm is cross-platform. Much faster than SQLite. blah blah blah. so I don't want to waste your time by explaining about Relam.we can dive into code.
For simplicity, I ignored the layout files. You can find the entire code in my Github repo.
Add the following line in respective Gradle files.
and in top app.gradle add
Today we are going create the Recylcerview in Kotlin with very simple and fewer lines of code.
To create a Recylcerview we need to create
Create a data class SimpleAdapter.kt with the code below .just look at the Data class how kotlin helps us to reduce boilerplate code. Setter getter also not required here.
Create SimpleAdapter.kt file with the code below. …
As we all know the purpose of splash screen but only few application use proper way.Here we are going to see the proper way and common mistake that are widely used to implement splash screen.
This method is widely used by most of the dev in there learning period. That is how to display a splash screen for a fixed amount of time when your app starts for the first time.
Its bad practices to make the user wait for the time every time. So never hard code the time for splash Screen.
yes by using the above code we purposefully wasted users 3 seconds. For the user it will be annoying. …