Home

Awesome

<a href="https://allanwang.github.io/KAU/" target="_blank"> <img src="https://cdn.rawgit.com/AllanWang/KAU/master/files/images/logo.svg" alt="KAU" width="30%"/> </a>

An extensive collection of <b>Kotlin Android Utils</b>

This library contains small helper functions used throughout almost all of my other projects. The goal is to make common interactions executable in a single line.

<a href='https://play.google.com/store/apps/details?id=ca.allanwang.kau.sample&utm_source=github'><img alt='Get it on Google Play' width="30%" src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png'/></a>

ChangelogMigration


KAU is available on JitPack

Build Status Crowdin Awesome Kotlin Badge ZenHub GitHub license

To apply, add the following to your root build.gradle:

allprojects {
    repositories {
        ...
        jcenter()
        maven { url "https://jitpack.io" }
        google()
    }
}

And add the following dependencies (You can use a specific version, commit, or -SNAPSHOT):

Note that only core is required if you want the basic features. Note that if you use any particular submodule, it will automatically include all of its necessary dependencies.

dependencies {
    // all submodules extend this
    implementation "ca.allanwang.kau:core:$KAU"
    // all submodules with extensive ui extend this
    implementation "ca.allanwang.kau:core-ui:$KAU"
    
    implementation "ca.allanwang.kau:about:$KAU"
    implementation "ca.allanwang.kau:adapter:$KAU"
    implementation "ca.allanwang.kau:colorpicker:$KAU"
    implementation "ca.allanwang.kau:fastadapter:$KAU"
    implementation "ca.allanwang.kau:kpref-activity:$KAU"
    implementation "ca.allanwang.kau:mediapicker:$KAU"
    implementation "ca.allanwang.kau:searchview:$KAU"
}

Submodules

Linked to their respective docs.<br/> Included dependencies are only those with exposed APIs; see new dependency configurations.<br/> Implemented external dependencies are wrapped in parentheses. All KAU submodule dependencies are implemented, with the exception of core in core-ui. This means that you'll need to explicitly include each submodule you'd like to use, even if another declared submodule depends on it.

Core

Core UI

About

Adapter

Color Picker

FastAdapter

KPref Activity

Media Picker

SearchView

Gradle Plugin


Showcase

About Activity Gif Ink Indicator Gif Color Picker Gif KPref Items Gif SearchView Gif Swipe Gif

Proguard/MultiDex

Given that the core module contains a lot of extension functions, you may run into a dex error (over 64k methods)

To resolve that, add multiDexEnabled true under your app.gradle > android > defaultConfig

Likewise, it is highly recommended to use proguard to clean up your project upon release. All KAU components support proguard out of the box. Some may have extra requirements for certain features, which will be detailed in their respective README.

Translations

KAU depends on translations crowdsourced by the general public. If you would like to contribute, please visit here

Special thanks to the following awesome people for translating significant portions of KAU!

LanguageContributors
ArabicMohammed Qubati
CatalanJaime Muñoz Martín
Chinese (Simplified)Alcatelia
Chinese (Traditional)yipinghuangSu, Jun-MingWei
Danishmhtorp
DutchItGuillaumeTatum ter Kuile
FrenchVincent KulakJean-Philippe Gravel
GalicianXesús M. Mosquera
GermanBushido1992Marcel Soehnchen3LD0mi HA
GreekGeorge Kitsopoulos
HungarianJános Erkli
IndonesianM. Angga Ariska
ItalianBonnee
Korean잇스테이크
Norwegian
PolishpantinPL
PortugueseSérgio MarquesMiguel Dos Reis
Portuguese (Brazilian)TheusKhan
RussianВадим Жушман
SerbianNikola Radmanović
SpanishJahir FiquitivaNefi Salazar
SwedishArtswitcher
TagalogFray Damaso
ThaiThanawat Hanthong
Turkishzuma17
UkrainianВадим Жушман
VietnameseAlienz

The full activity stream for the translations can be found here