Coder Social home page Coder Social logo

allanwang / kau Goto Github PK

View Code? Open in Web Editor NEW
222.0 9.0 27.0 2.55 MB

An extensive collection of Kotlin Android Utils

Home Page: https://allanwang.github.io/KAU/

License: Apache License 2.0

Java 20.49% Kotlin 78.73% Ruby 0.01% HTML 0.62% Shell 0.16%
kotlin kotlin-android-utils kotlin-android android sharedpreferences extensions utils library searchview material

kau's Introduction

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

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 {
        ...
        mavenCentral()
        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.
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.

  • Collection of complex views and widgets
  • Includes :core
  • 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
  • RecyclerView animations
  • Includes :core
  • Implementation of a color picker dialog with subtle transitions and a decoupled callback
  • Includes :core
  • Kotlin bindings for the fast adapter
  • Includes :core, :adapter, Fast Adapter
  • Fully programmatic implementation of a Preference Activity, backed by a RecyclerView
  • Includes :core, :fastadapter, :colorpicker
  • Fully functional image and video pickers, both as an overlay and as a requested activity.
  • Includes :core-ui, Glide, (Blurry)
  • Material searchview with kotlin bindings
  • Includes :core-ui, :fastadapter
  • Gradle plugin to help facilitate versioning and other gradle functions

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!

Language Contributors
Arabic Mohammed Qubati
Catalan Jaime Muñoz Martín
Chinese (Simplified) Alcatelia
Chinese (Traditional) yipinghuangSu, Jun-MingWei
Czech Lukas Novotny
Danish mhtorp
Dutch ItGuillaumeTatum ter Kuile
Finnish Rynach
French Vincent KulakJean-Philippe Gravel
Galician Xesús M. Mosquera
German Bushido1992Marcel Soehnchen3LD0mi HA
Greek George Kitsopoulos
Hungarian János Erkli
Indonesian M. Angga Ariska
Italian BonneeKeita Tanaka
Japanese maru2213
Korean 잇스테이크
Malayalam Abhishek M
Norwegian
Polish pantinPL
Portuguese Sérgio MarquesMiguel Dos Reis
Portuguese (Brazilian) TheusKhan
Russian Вадим Жушман
Serbian Nikola Radmanović
Spanish Jahir FiquitivaNefi Salazar
Swedish Artswitcher
Tagalog Fray Damaso
Tamil rooban23
Thai Thanawat Hanthong
Turkish zuma17
Ukrainian Вадим Жушман
Vietnamese Alienz

The full activity stream for the translations can be found here

kau's People

Contributors

allanwang avatar jahirfiquitiva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kau's Issues

SearchView is not shown in multiwindow mode

When the app is in multiwindow mode and shown in the bottom part of the screen, the search view is not shown.

The second screenshot is how it's shown when the app occupies ~3/4 of the screen.

Thanks

screenshot_20180121-131848

screenshot_20180121-132255

Add better wrapping for swipe

It seems like there are still cases where an activity is incorrectly generated or modified.

Either add a try catch or add further checks before injecting our layout

Check about lib items

There may be a double ripple happening from the library item. Check to see if that's the case.

Use MeasureSpecDelegate

Eg BoundedCardView & CutoutView can rely on the delegate rather than making their own patterns

ImageActivity.kt line 156

@asdfasdfvful commented on Sat Aug 19 2017

in com.pitchedapps.frost.activities.ImageActivity.imageCallback

  • Number of crashes: 1
  • Impacted devices: 1

There's a lot more information about this crash on crashlytics.com:
https://fabric.io/pitched-apps/android/apps/com.pitchedapps.frost/issues/5997f7e3be077a4dcc4bef77?utm_medium=service_hooks-github&utm_source=issue_impact


@AllanWang commented on Sat Aug 19 2017

For some reason, the external directory method returns varying path.

See stack overflow question

Perhaps add a check to verify that the uri can be retrieved through the file provider?
Or check if the uri is needed at all since it's all internal.

Disable seekbar when the contract enabler is false

I'm trying to disable the seekbar of a preference in a KPrefActivity when the KPrefSeekbar.KPrefSeekbarContract enabler is false.

This is my contract:

fun KPrefSeekbar.KPrefSeekbarContract.dependsOnLocationPermission() {
    enabler = { hasPermission(Manifest.permission.ACCESS_FINE_LOCATION) }
    onDisabledClick = { snackbar(R.string.requires_location_permission) }
}

As you can see in this video, the preference is disabled, but the seekbar is still enabled. Can you guide me how to disable it?

Logger rewrite

The Kau logger will no longer depend on timber, and should have the following:

Toggles for debug and release, along with filtering
Two string inputs, where the last one contains private info

Update readme

  • :adapter: animator
  • :imagepicker:
  • :adapter: iitems
  • :core-ui: elastic recycler activity

TextView.java line 10293

@asdfasdfvful commented on Thu Sep 28 2017

in android.widget.TextView.setSpan_internal

  • Number of crashes: 1
  • Impacted devices: 1

There's a lot more information about this crash on crashlytics.com:
https://fabric.io/pitched-apps/android/apps/com.pitchedapps.frost/issues/59cdc52dbe077a4dcc701b20?utm_medium=service_hooks-github&utm_source=issue_impact


@AllanWang commented on Sat Oct 07 2017

index bounds are wrong


@AllanWang commented on Sat Oct 07 2017

may be related to the searchview?

Fix FAQ background

Main background should extend below answer as divider color may be transparent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.