Android kotlin extentions library.

Overview

KEXtentions

This is ALPHA version. Dont use in production code!

Kotlin and Android extentions library.

How to add it:

  • Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:
  allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
  • Step 2. Add the dependency
dependencies {
	        implementation 'com.github.nightgoat:kextentions:0.0.2'
	}
You might also like...
A Kotlin Android library for heuristics evasion that prevents your code from being tested.

EvadeMe An Android library for heuristics evasion that prevents your code from being tested. User Instructions Add the maven repository to your projec

Easy lightweight SharedPreferences library for Android in Kotlin using delegated properties
Easy lightweight SharedPreferences library for Android in Kotlin using delegated properties

Easy lightweight SharedPreferences library for Android in Kotlin using delegated properties Idea Delegated properties in Kotlin allow you to execute a

Android AsyncTask wrapper library, written in Kotlin

KillerTask This is a Kotlin Android library to create async background tasks. Inspired by TinyTask, but more beautiful and easy to use for Kotlin Andr

A Kotlin work manager library for Android with progress notifications and Hilt support.

Boot Laces A kotlin work manager library for Android that includes notifications and Hilt support. User Instructions Add the JitPack repository to you

Stateful is a Kotlin library which makes Android application development faster and easier.

Stateful Stateful is a Kotlin library which makes Android application development faster and easier. It helps you delete all the boilerplate code for

Android Library for requesting Permissions with Kotlin Coroutines or AndroidX LiveData

PEKO PErmissions with KOtlin Android Permissions with Kotlin Coroutines or LiveData No more callbacks, builders, listeners or verbose code for request

An Android Library that provides social login for 15 platforms within by RxJava2, Kotlin and Firebase Authentication.
An Android Library that provides social login for 15 platforms within by RxJava2, Kotlin and Firebase Authentication.

RxSocialLogin The license information for logo is located at the bottom of the document. These instructions are available in their respective language

Kaffeine is a Kotlin-flavored Android library for accelerating development.

Kaffeine Kaffeine is a Kotlin-flavored Android library for accelerating development. Several Words of Caution Besides the obvious productivity advanta

Koi, a lightweight kotlin library for Android Development.

Koi - A lightweight Kotlin library for Android Koi include many useful extensions and functions, they can help reducing the boilerplate code in Androi

Comments
  • 0.0.9 version

    0.0.9 version

    • updated libraries and graddle
    • View, Activity, Fragment show/hide keyboard ext
    • fragment window width ext
    • HorisontalScrollView ext
    • New extentions for working with dates
    • missleading naming improvments
    opened by NightGoat 0
Releases(1.0.2)
  • 0.1.4(Nov 30, 2021)

  • 0.1.3.4(Nov 20, 2021)

  • 0.1.1(Sep 16, 2021)

  • 0.1.0(Aug 29, 2021)

  • 0.0.9.1(Jul 31, 2021)

    • updated libraries and graddle
    • View, Activity, Fragment show/hide keyboard ext
    • fragment window width ext
    • HorisontalScrollView ext
    • New extentions for working with dates
    • missleading naming improvments
    Source code(tar.gz)
    Source code(zip)
  • 0.0.8(Jul 24, 2021)

    • Boolean to string and vice versa transformations
    • MutableList swapping methods
    • Date to String map
    • Numeric to Boolean transofrmations
    • MutableLiveData extentions
    • Constants classes: KexConstants and DateFormats
    • Option to turn off that nasty logging everywhere
    Source code(tar.gz)
    Source code(zip)
  • 0.0.7(Jul 4, 2021)

    • LongExt
    fun Long?.orZero(): Long = this ?: 0L
    fun Long.toNegative(): Long = -abs(this)
    fun Long.toPositive(): Long = abs(this)
    fun Long.reverse(): Long = this.unaryMinus()
    fun Long.takeIfZero(): Long? = this.takeIf { it == 0L }
    fun Long.takeIfNotZero(): Long? = this.takeIf { it != 0L }
    fun Long?.toStringOrEmpty() = this?.toString().orEmpty()
    fun Long.takeIfZeroOrEmpty() = this.takeIf { it == 0L }?.toStringOrEmpty()
    
    • DoubleExt
    fun Double.toNegative() = -abs(this)
    fun Double.toPositive() = abs(this)
    
    fun Double.reverse() = this.unaryMinus()
    
    fun Double.takeIfZero() = this.takeIf { it == 0.0 }
    fun Double.takeIfNotZero() = this.takeIf { it != 0.0 }
    
    • IntExt
    fun Int?.toStringOrEmpty() = this?.toString().orEmpty()
    fun Int.takeIfZeroOrEmpty() = this.takeIf { it == 0 }?.toStringOrEmpty()
    
    • CollectionsExt
    fun <T, R> List<T>.mapAndFind(map: (T) -> R, find: (R) -> Boolean) = this.asSequence()
        .map(map)
        .find(find)
    
    • BooleanExt
    fun Boolean.doIfTrue(doFun: () -> Unit): Boolean {
        if (this) {
            doFun.invoke()
        }
        return this
    }
    
    fun Boolean.doIfFalse(doFun: () -> Unit): Boolean {
        if (!this) {
            doFun.invoke()
        }
        return this
    }
    
    • ScrollViewExt
    
    fun ScrollView.smoothScrollToTop() {
        smoothScrollTo(0, 0)
    }
    
    fun ScrollView.scrollToTop() {
        scrollTo(0, 0)
    }
    
    fun ScrollView.smoothScrollToBottom() {
        smoothScrollTo(this.right, this.bottom)
    }
    
    fun ScrollView.scrollToBottom() {
        scrollTo(this.right, this.bottom)
    }
    
    • BottomNavigationViewExt
    fun BottomNavigationView.setChecked(numberItemChecked: Int) {
        this.menu.getItem(numberItemChecked).isChecked = true
    }
    
    • FragmentExt
    fun <T> Fragment.wakeUpLiveData(vararg liveData: LiveData<T>) {
        liveData.forEach {
            it.activate(viewLifecycleOwner)
        }
    }
    
    inline fun <reified T> Fragment.argument(argumentKey: String): Lazy<T?> = unsafeLazy {
        arguments?.get(argumentKey) as? T
    }
    
    inline fun <reified T> DialogFragment.argument(argumentKey: String): Lazy<T?> = unsafeLazy {
        arguments?.get(argumentKey) as? T
    }
    
    inline fun <reified T> Fragment.argumentOrDefault(argumentKey: String, defaultValue: T): Lazy<T> =
        unsafeLazy {
            arguments?.get(argumentKey) as? T ?: defaultValue
        }
    
    inline fun <reified T> DialogFragment.argumentOrDefault(
        argumentKey: String,
        defaultValue: T
    ): Lazy<T> = unsafeLazy {
        arguments?.get(argumentKey) as? T ?: defaultValue
    }
    
    fun Fragment.showShortToast(text: String) {
        Toast.makeText(requireContext(), text, Toast.LENGTH_SHORT).show()
    }
    
    fun Fragment.showShortToast(text: () -> String) {
        Toast.makeText(requireContext(), text.invoke(), Toast.LENGTH_SHORT).show()
    }
    
    fun Fragment.showLongToast(text: String) {
        Toast.makeText(requireContext(), text, Toast.LENGTH_LONG).show()
    }
    
    fun Fragment.showLongToast(text: () -> String) {
        Toast.makeText(requireContext(), text.invoke(), Toast.LENGTH_LONG).show()
    }
    
    Source code(tar.gz)
    Source code(zip)
  • 0.0.5(Jun 14, 2021)

  • 0.0.4(Jun 8, 2021)

  • 0.0.2(May 29, 2021)

Owner
Nail' Asadullin
Android developer
Nail' Asadullin
Run Kotlin/JS libraries in Kotlin/JVM and Kotlin/Native programs

Zipline This library streamlines using Kotlin/JS libraries from Kotlin/JVM and Kotlin/Native programs. It makes it possible to do continuous deploymen

Cash App 1.5k Dec 30, 2022
A somewhat copy past of Jetbrain's code from the kotlin plugin repo to make it humanly possible to test Intellij IDEA kotlin plugins that work on kotlin

A somewhat copy past of Jetbrain's code from the kotlin plugin repo to make it humanly possible to test Intellij IDEA kotlin plugins that work on kotlin

common sense OSS 0 Jan 20, 2022
[Android Library] A SharedPreferences helper library to save and fetch the values easily.

Preference Helper A SharedPreferences helper library to save and fetch the values easily. Featured in Use in your project Add this to your module's bu

Naveen T P 13 Apr 4, 2020
Kotlin library for Android

KAndroid Kotlin library for Android providing useful extensions to eliminate boilerplate code in Android SDK and focus on productivity. Download Downl

Paweł Gajda 890 Nov 13, 2022
🔓 Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher.

EasyPermissions-ktx Kotlin version of the popular googlesample/easypermissions wrapper library to simplify basic system permissions logic on Android M

Madalin Valceleanu 326 Dec 23, 2022
Android Spinner Dialog Library supported on both Java and Kotlin, Use for single or multi selection of choice

SpinnerDialog Android Spinner Dialog Library, Use for single or multi selection of choice Android UI Download To include SpinnerDialog in your project

Hamza Khan 55 Sep 15, 2022
A Kotlin library for reactive and boilerplate-free SharedPreferences in Android

KPreferences A Kotlin library for reactive and boilerplate-free Shared Preferences in Android. With KPreferences you can use Kotlin's marvelous delega

Mohamad Amin Mohamadi 19 Dec 16, 2020
The most complete and powerful data-binding library and persistence infra for Kotlin 1.3, Android & Splitties Views DSL, JavaFX & TornadoFX, JSON, JDBC & SQLite, SharedPreferences.

Lychee (ex. reactive-properties) Lychee is a library to rule all the data. ToC Approach to declaring data Properties Other data-binding libraries Prop

Mike 112 Dec 9, 2022
A Bluetooth kotlin multiplatform "Cross-Platform" library for iOS and Android

Blue-Falcon A Bluetooth "Cross Platform" Kotlin Multiplatform library for iOS, Android, MacOS, Raspberry Pi and Javascript. Bluetooth in general has t

Andrew Reed 220 Dec 28, 2022
A Kotlin Android library for content provider queries with reactive streams and coroutines.

Pickpocket An Android library for content provider queries with reactive streams and coroutines. Calendar Contacts SMS MMS Files/Media Call Log Bookma

Chris Basinger 27 Nov 14, 2022