A Kotlin app made using the best practices, most recent Jetpack libraries, and Kotlin coroutines.
To add a FloatingActionButton that opens up a Dialog which displays the installation date (persistent), current time (dynamic) and a downloaded image, add the code below to your project.
Root Gradle:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
App Gradle
dependencies {
implementation 'com.github.DeveloperKurt:GameDatabase:2.1'
}
Activity
override fun onCreate(savedInstanceState: Bundle?)
{
super.onCreate(savedInstanceState)
Module(this)
}
Customize the Theme by Adding Attributes:
- colorSecondary: FloatingActionButton's background color
- colorOnSecondary: FloatingActionButton's icon color
- colorSurface: Dialog's background color
Game Database's repository supports different configurations but by default, it treats network server's data as a rapidly-changing live data. Therefore, it fetches the data at short intervals and caches them if it detects any differences. It respects the single source of truth architecture and SOLID principles. The data is always retrieved through the Room database where it is exposed as a Flow in the repository layer. ViewModels collect those Flows and transforms them into LiveDatas. And from there on, the fragments display the data through data-binding.
Every I/O operation is done through coroutines and their lifecycle is managed by the coroutine scopes to avoid memory leaks.
- Design patterns
- Dependency Injection
- Object-Oriented Programming
- Version Control
- Day/Night Theme
- Data and view binding
- Single Activity pattern with the Navigation Component
- Creating an Android library
- Retrofit
- Room
- HILT
- OkHttp
- GSON
- Flow
- LiveData
- Coroutine
- ViewModel
- Glide
- Timber
- Palette