Sweet Android libraries written in Kotlin

Overview

API 16 Download Apache License 2.0

Kandy

A Kotlin library set dedicated to Android platform which will make programming sweet again!

Repository

All modules are available on the jcenter. In order to import them, make sure your project includes the appropriate repository.

Project build.gradle.kts

repositories {
    // ...
    jcenter()
}

Kandy List Views

Highly flexible list view which will help you to write much less code and spend much less time for such basic thing as list view. Forget about writing copy-pasting another RecyclerView.Adapter. Let Kandy List Views set everything up for you. Basically, all you need to do is write a custom view holder for each model you want to see as a list item.

Flexibility

You can use any number of any types of list items within a single adapter. KandyListAdapter will take care of defining and managing view types.

Convenience

onBind method of a view holder provide you a type-safe getter of a list item. No need to keep an eye on a collection of data you've passed to the list view adapter. Let this method retrieve the appropriate object for you (including the inside of event listeners.)

Minimal working example

Custom view holder definition

class StringViewHolder(itemView: View) : AbstractDefaultKandyViewHolder<String>(itemView) {
    private val textView = itemView as TextView
    override fun onBind(position: Int, adapter: KandyListAdapter, listItemGetter: () -> KandyListItem<String>) {
        textView.text = listItemGetter().item
    }
}

Adapter initialization

val adapter = KandyListAdapter(
    KandyListItem(
        "String item",
        KandyItemView { TextView(this) }
    ) { itemView -> StringViewHolder(itemView) }
)

Full example

For full example, please refer to this file.

Import

Module build.gradle.kts

dependencies {
    // ...
    implementation("com.kwezal.kandy:listviews:${Version.kandy}@aar")
            { isTransitive = true } // Includes RecyclerView dependency
}

Kandy Dialogs

Simple DSL-like wrapper for AlertDialogs. Not only it makes the code shorter and prettier, but also more convenient to use.

The simplest example

show { dialog("Message", "Title") { positiveButton("OK") } }

Full example

For full example, please refer to this file.

Import

Module build.gradle.kts

dependencies {
    // ...
    implementation("com.kwezal.kandy:dialogs:${Version.kandy}@aar")
}

Kandy Logs

Android logs made so super simple you'll KISS them. No installation required. Automatic tag generation. Featherweight. No runtime overhead on production.

The simplest example

logD { "Message" }

Full example

For full example, please refer to this file.

Import

Module build.gradle.kts

debugImplementation("com.kwezal.kandy:logs-debug:${Version.kandy}@aar")
releaseImplementation("com.kwezal.kandy:logs-release:${Version.kandy}@aar")

The rest

Other modules of this set of libraries will be published soon. As for now I'd appreciate any kind of feedback or contribution.

You might also like...
Automated-build-android-app-with-github-action - CI/CD Automated Build Android App Bundle / APK / Signed With Github Action
Automated-build-android-app-with-github-action - CI/CD Automated Build Android App Bundle / APK / Signed With Github Action

Automated Build Android With Using Github Action Project Github Action Script Us

proguard resource for Android by wechat team

AndResGuard Read this in other languages: English, 简体中文. AndResGuard is a tooling for reducing your apk size, it works like the ProGuard for Java sour

A super fast build tool for Android, an alternative to Instant Run
A super fast build tool for Android, an alternative to Instant Run

Freeline Freeline is a super fast build tool for Android and an alternative to Instant Run. Caching reusable class files and resource indices, it enab

Command-line tool to count per-package methods in Android .dex files

dex-method-counts Simple tool to output per-package method counts in an Android DEX executable grouped by package, to aid in getting under the 65,536

View Inspection Toolbar for Android Development
View Inspection Toolbar for Android Development

View Inspector Plugin View inspection toolbar for android development. Features Boundary show outlines show margins show paddings Layer Scalpel featur

Make Android screenshots of scrollable screen content
Make Android screenshots of scrollable screen content

scrollscreenshot Make Android screenshots of scrollable screen content - brought to you by PGS Software SA This tool makes a number of screenshots, sc

[] Dissect layout traversals on Android
[] Dissect layout traversals on Android

Probe Dissect layout traversals on Android. Features Intercept View methods. onMeasure(int, int) onLayout(boolean, int, int, int, int) draw(Canvas) an

Android Library Finder
Android Library Finder

alfi Android Library Finder Search through thousands of android libraries that can help you scale your projects elegantly Usage Search for something a

Annotation based simple API flavored with AOP to handle new Android runtime permission model

Let Annotation based simple API flavoured with AOP to handle new Android runtime permission model. If you check Google's Samples about the new permiss

Owner
Kwezal
Time for Freedom and Creativity
Kwezal
🍼Debug Bottle is an Android runtime debug / develop tools written using kotlin language.

???? 中文 / ???? 日本語 / ???? English ?? Debug Bottle An Android debug / develop tools written using Kotlin language. All the features in Debug bottle are

Yuriel Arlencloyn 846 Nov 14, 2022
A CLI client for Up Bank, written in Kotlin.

upperkt pronounced /ˈʌpəkʌt/ Uppercut your Up balance today! (It's a CLI client for Up - an Australian neobank, written in Kotlin) Installing Right no

Duale Siad 2 Dec 3, 2021
Analytics Tools for Kotlin Multiplatform Mobile iOS and android

Index Features Example Introduce Architecture Installation Configure Using Screen Mapper Initialization Implementation Delegate Parameters ATEventPara

LINE 16 Dec 5, 2022
The Kotlin fake data generator library!

Fakeit This library is a port of the Ruby gem Faker. It generates realistic fake data — like names, emails, dates, countries — for a variety of scenar

Moove It 517 Nov 20, 2022
A tool to install components of the Android SDK into a Maven repository or repository manager to use with the Android Maven Plugin, Gradle and other tools.

Maven Android SDK Deployer Original author including numerous fixes and changes: Manfred Moser [email protected] at simpligility technologies i

simpligility 1.4k Dec 27, 2022
A simple utility to remove unused resources in your Android app to lower the size of the APK. It's based on the Android lint tool output.

android-resource-remover android-resource-remover is utility that removes unused resources reported by Android Lint from your project. The goal is to

Keepsafe 1.3k Dec 16, 2022
This is a Android Studio/ IntelliJ IDEA plugin to localize your Android app, translate your string resources automactically.

#Android Localizationer This is a Android Studio/ IntelliJ IDEA plugin to localize your Android app, translate your string resources automactically. T

Wesley Lin 822 Dec 8, 2022
A tool to install components of the Android SDK into a Maven repository or repository manager to use with the Android Maven Plugin, Gradle and other tools.

Maven Android SDK Deployer Original author including numerous fixes and changes: Manfred Moser [email protected] at simpligility technologies i

simpligility 1.4k Dec 27, 2022