Product Promotion
0x5a.live
for different kinds of informations and explorations.
GitHub - costular/kotlin-android-utils: Android utilities for easier and faster Kotlin programming.
Android utilities for easier and faster Kotlin programming. - costular/kotlin-android-utils
Visit SiteGitHub - costular/kotlin-android-utils: Android utilities for easier and faster Kotlin programming.
Android utilities for easier and faster Kotlin programming. - costular/kotlin-android-utils
Powered by 0x5a.live ๐
Android utilities for easier and faster Kotlin programming.
Download
Gradle
compile 'com.costular:kotlin-utils:0.1'
How to use
It depends on utilities. Some of them just work as function extensions and you don't have to do anything special, just call a method like another one.
API
Activity
setFullScreen()
showToolbar() // Support and native
hideToolbar() // Support and native
Context
getClipboardManager()
copyTextToClipboard(value: String)
copyUriToClipboard(uri: Uri)
getTextFromClipboard(): CharSequence
getUriFromClipboard(): Uri?
getPreferences(): SharedPreferences
getPreferences(name: String, mode: Int): SharedPreferences
SharedPreferences
SharedPreferences.use(lambda)
It automatically applies after lambda execution
val sharedPrefs = context.getPreferences()
sharedPrefs.edit {
putBoolean("first_use", false) // This refers to sharedPrefs instance
}
Versions
These methods are static.
doWithVersion(version: Int, lambda) // ==
doWithAtLeastVersion(version: Int, lambda) // >=
doWithHigherVersion(version: Int, lambda) // >
doWithLowerVersion(version: Int, lambda) // <
Example
doWithAtLeastVersion(21) {
// Do something on Lollipop version or higher
}
Kotlin Resources
are all listed below.
GitHub - BenWoodworth/knbt: Kotlin NBT library for kotlinx.serialization
resource
~/github.com
resource
GitHub - brianmadden/krawler: A web crawling framework written in Kotlin
resource
~/github.com
resource
GitHub - OxygenCobalt/Auxio: A simple, rational music player for android
resource
~/github.com
resource
GitHub - eriksencosta/math-percentage: Percentage calculations made easy
resource
~/github.com
resource
GitHub - ctripcorp/mmkv-kotlin: A Kotlin Multiplatform porting for MMKV.
resource
~/github.com
resource
GitHub - Litote/kmongo: [deprecated] KMongo - a Kotlin toolkit for Mongo
resource
~/github.com
resource
Test-Driven Development Tutorial for Android: Getting Started
resource
~/www.raywenderlich.com
resource
GitHub - jacinpoz/rxaerospike: RxJava2 wrapper for aerospike-client-java
resource
~/github.com
resource
GitHub - pedrovgs/KotlinSnapshot: Snapshot Testing framework for Kotlin.
resource
~/github.com
resource
GitHub - hankdavidson/ktime: kotlin extensions to the java8 time library
resource
~/github.com
resource
GitHub - ziggy42/Blum: A simple android Twitter client written in Kotlin
resource
~/github.com
resource
Made with โค๏ธ
to provide different kinds of informations and resources.