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](docs/Changelog.md) • [Migration](docs/Migration.md) ------------ KAU is available on JitPack [![](https://jitpack.io/v/ca.allanwang/kau.svg)](https://jitpack.io/#ca.allanwang/kau) [![Build Status](https://github.com/AllanWang/KAU/actions/workflows/android.yml/badge.svg?branch=dev)](https://github.com/AllanWang/KAU/actions/workflows/android.yml) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/kotlin-android-utils/localized.svg)](https://crowdin.com/project/kotlin-android-utils) [![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin) [![ZenHub](https://img.shields.io/badge/Shipping%20faster%20with-ZenHub-45529A.svg)](https://app.zenhub.com/workspace/o/allanwang/kau/boards) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/AllanWang/KAU/master/LICENSE) To apply, add the following to your root build.gradle: ```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. ```gradle 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.
> Included dependencies are only those with exposed APIs; see [new dependency configurations](https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#new_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#readme) * Collection of extension functions and small helper methods applicable in almost any application. * Notable features: * [KPrefs](core#kprefs) * [Changelog XML](core#changelog-xml) * [FAQ XML](core#faq-xml) * [Kotterknife](core#kotterknife) * [Ripple Canvas](core#ripple-canvas) * [MeasureSpecDelegate](core#measure-spec-delegate) * [CollapsibleViewDelegate](core#collapsible-view-delegate) * [Swipe](core#swipe) * [Debounce](core#debounce) * [KAU Logger](core#kau-logger) * [Email Builder](core#email-builder) * [Extension Functions](core#extension-functions) * [Lazy Resettable](core#lazy-resettable) * Includes [`AndroidX Components`](https://developer.android.com/topic/libraries/support-library/index.html), [`Material Dialogs (core)`](https://github.com/afollestad/material-dialogs), [`Iconics`](https://github.com/mikepenz/Android-Iconics), [`Kotlin stdlib`](https://kotlinlang.org/api/latest/jvm/stdlib/) ## [Core UI](core-ui#readme) * Collection of complex views and widgets * Includes `:core` ## [About](about#readme) * 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`, `:fastadapter`, [`About Libraries`](https://github.com/mikepenz/AboutLibraries) ## [Adapter](adapter#readme) * RecyclerView animations * Includes `:core` ## [Color Picker](colorpicker#readme) * Implementation of a color picker dialog with subtle transitions and a decoupled callback * Includes `:core` ## [FastAdapter](fastadapter#readme) * Kotlin bindings for the fast adapter * Includes `:core`, `:adapter`, [`Fast Adapter`](https://github.com/mikepenz/FastAdapter) ## [KPref Activity](kpref-activity#readme) * Fully programmatic implementation of a Preference Activity, backed by a RecyclerView * Includes `:core`, `:fastadapter`, `:colorpicker` ## [Media Picker](mediapicker#readme) * Fully functional image and video pickers, both as an overlay and as a requested activity. * Includes `:core-ui`, [`Glide`](https://github.com/bumptech/glide), ([`Blurry`](https://github.com/wasabeef/Blurry)) ## [SearchView](searchview#readme) * Material searchview with kotlin bindings * Includes `:core-ui`, `:fastadapter` ## [Gradle Plugin](buildSrc#readme) * Gradle plugin to help facilitate versioning and other gradle functions ----------- # Showcase ![About Activity Gif](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/kau/kau_about_activity.gif) ![Ink Indicator Gif](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/kau/kau_ink_indicator.gif) ![Color Picker Gif](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/kau/kau_color_picker.gif) ![KPref Items Gif](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/kau/kau_kpref_items.gif) ![SearchView Gif](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/kau/kau_search_view.gif) ![Swipe Gif](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/kau/kau_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](https://crwd.in/kotlin-android-utils) Special thanks to the following awesome people for translating significant portions of KAU! | Language | Contributors | |----------|--------------| | Arabic | [Mohammed Qubati](https://crowdin.com/profile/Mrkqubati) | | Catalan | [Jaime Muñoz Martín](https://crowdin.com/profile/jmmartin_5) | | Chinese (Simplified) | [Alcatelia](https://crowdin.com/profile/Alcatelia) | | Chinese (Traditional) | [yipinghuang](https://crowdin.com/profile/yipinghuang) • [Su, Jun-Ming](https://crowdin.com/profile/sujunmin) • [Wei](https://crowdin.com/profile/wei4green) | | Czech | [Lukas Novotny](https://crowdin.com/profile/novas78) | | Danish | [mhtorp](https://crowdin.com/profile/mhtorp) | | Dutch | [ItGuillaume](https://crowdin.com/profile/ltGuillaume) • [Tatum ter Kuile](https://crowdin.com/profile/Teitr) | | Finnish | [Rynach](https://crowdin.com/profile/Rynach) | | French | [Vincent Kulak](https://github.com/VonOx) • [Jean-Philippe Gravel](https://crowdin.com/profile/wokija) | | Galician | [Xesús M. Mosquera](https://twitter.com/xesusmmc?lang=en) | | German | [Bushido1992](https://forum.xda-developers.com/member.php?u=5179246) • [Marcel Soehnchen](https://crowdin.com/profile/msoehnchen) • [3LD0mi HA](https://forum.xda-developers.com/member.php?u=5860523) | | Greek | [George Kitsopoulos](https://crowdin.com/profile/GeorgeKitsopoulos) | | Hungarian | [János Erkli](https://crowdin.com/profile/erklijani0521) | | Indonesian | [M. Angga Ariska](https://www.youtube.com/channel/UCkqMw81s2aw7bYO-U2YhD7w) | | Italian | [Bonnee](https://github.com/Bonnee) • [Keita Tanaka](https://crowdin.com/profile/Keita_Tanaka) | | Japanese | [maru2213](https://crowdin.com/profile/maru2213) | | Korean | [잇스테이크](https://crowdin.com/profile/bexco2010) | | Malayalam | [Abhishek M](https://crowdin.com/profile/abhishekabhi789) | | Norwegian | | | Polish | [pantinPL](https://crowdin.com/profile/pantinPL) | | Portuguese | [Sérgio Marques](https://crowdin.com/profile/smarquespt) • [Miguel Dos Reis](https://crowdin.com/profile/siersod) | | Portuguese (Brazilian) | [TheusKhan](https://crowdin.com/profile/TheusKhan) | | Russian | [Вадим Жушман](https://crowdin.com/profile/android54544) | | Serbian | [Nikola Radmanović](https://crowdin.com/profile/nikoladradmanovic) | | Spanish | [Jahir Fiquitiva](https://jahirfiquitiva.me/) • [Nefi Salazar](https://plus.google.com/u/0/105547968033551087431)| | Swedish | [Artswitcher](https://crowdin.com/profile/Artswitcher) | | Tagalog | [Fray Damaso](https://crowdin.com/profile/Fray_Damaso) | | Tamil | [rooban23](https://crowdin.com/profile/rooban23) | | Thai | [Thanawat Hanthong](https://crowdin.com/profile/peet6015) | | Turkish | [zuma17](https://crowdin.com/profile/zuma17) | | Ukrainian | [Вадим Жушман](https://crowdin.com/profile/android54544) | | Vietnamese | [Alienz](https://crowdin.com/profile/alienyd) | The full activity stream for the translations can be found [here](https://crowdin.com/project/kotlin-android-utils/activity_stream)