An extensive collection of Kotlin Android Utils
Clone or download
AllanWang Fix/kprefseekbar builder (#174)
* Convert seekbar fields to getters

* Make getters inline

* Add spacing in readme, resolves #173

* Placeholder commit
Latest commit 9dd6249 Oct 18, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_layouts Major update to core and kotterknife; create mediapicker (#15) Aug 1, 2017
about Enhancement/public xml (#171) Oct 8, 2018
adapter Enhancement/public xml (#171) Oct 8, 2018
buildSrc Fix/kprefseekbar builder (#174) Oct 18, 2018
colorpicker Enhancement/public xml (#171) Oct 8, 2018
core-ui Enhancement/public xml (#171) Oct 8, 2018
core Enhancement/public xml (#171) Oct 8, 2018
docs Fix/kprefseekbar builder (#174) Oct 18, 2018
files Update/fast adapter (#138) Feb 24, 2018
gradle/wrapper Update/android studio 3.1 (#146) Apr 8, 2018
kpref-activity Fix/kprefseekbar builder (#174) Oct 18, 2018
mediapicker Enhancement/public xml (#171) Oct 8, 2018
sample Enhancement/kpref (#170) Oct 8, 2018
searchview Enhancement/public xml (#171) Oct 8, 2018
.gitignore Enhancement/public xml (#171) Oct 8, 2018
.travis.yml Fix/kprefseekbar builder (#174) Oct 18, 2018
Gemfile Test git pagge Jun 28, 2017
LICENSE Add color picker animations Jun 11, 2017
README.md Fix/kprefseekbar builder (#174) Oct 18, 2018
_config.yml Test git pagge Jun 28, 2017
android-lib.gradle Clean up kotterknife (#161) Sep 9, 2018
artifacts.gradle Enhancement/public xml (#171) Oct 8, 2018
build.gradle Update/android studio 3.1 (#146) Apr 8, 2018
crowdin.yaml Feature/translation integration (#104) Nov 13, 2017
gradle.properties Create buildSrc Jan 25, 2018
gradlew Update more versions Oct 8, 2018
gradlew.bat Update/android studio 3.1 (#146) Apr 8, 2018
settings.gradle Create buildSrc Jan 25, 2018

README.md

KAU

An extensive collection of Kotlin Android Utils

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.

Get it on Google Play

Changelog Migration


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()
    }
}

(If you are using gradle < 4.0, use maven { url "https://maven.google.com" } instead of 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:colorpicker:$KAU"
    implementation "ca.allanwang.kau:kpref-activity:$KAU"
    implementation "ca.allanwang.kau:mediapicker:$KAU"
    implementation "ca.allanwang.kau:searchview:$KAU"
}

// optional buildscript plugin (see below)
buildscript {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }

    dependencies {
        ...
        classpath "ca.allanwang:kau:${KAU}"
    }
}

(If you are using gradle < 4.0, use compile instead of implementation)


Submodules

Linked to their respective docs.
Included dependencies are only those with exposed APIs; see new dependency configurations.
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

  • Collection of complex views and widgets
  • Includes :core, :adapter

About

  • Modularized overlaying about section. Comes with a main panel, automatic lib detection, and a FAQ parser; also includes the lib strings for KAU.
  • Includes :core-ui, :adapter, About Libraries

Adapter

  • Kotlin bindings for the fast adapter, as well as modularized RecyclerView animations
  • Includes :core, Fast Adapter

Color Picker

  • Implementation of a color picker dialog with subtle transitions and a decoupled callback
  • Includes :core, (Material Dialogs (commons))

KPref Activity

  • Fully programmatic implementation of a Preference Activity, backed by a RecyclerView
  • Includes :core, :adapter, :colorpicker

Media Picker

  • Fully functional image and video pickers, both as an overlay and as a requested activity.
  • Includes :core-ui, Glide, (Blurry)

SearchView

  • Material searchview with kotlin bindings
  • Includes :core-ui, :adapter

Gradle Plugin

  • Gradle plugin to help facilitate versioning and other gradle functions

Showcase

About Activity Gif Ink Indicator Gif Color Picker Gif Color Picker Custom 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!

Language Contributors
Chinese (Simplified)
French Vincent KulakJean-Philippe Gravel
Galician Xesús M. Mosquera
German Bushido1992Marcel Soehnchen3LD0mi HA
Indonesian M. Angga Ariska
Italian Bonnee
Korean 잇스테이크
Norwegian
Polish
Portuguese TheusKhan
Spanish Jahir FiquitivaNefi Salazar
Thai
Turkish
Vietnamese Alienz

The full activity stream for the translations can be found here