KAndroid alternatives and similar packages
Based on the "Kotlin" category.
Alternatively, view KAndroid alternatives based on common mentions on social networks and blogs.
-
android-youtube-player
YouTube Player library for Android and Chromecast, stable and customizable. -
CalendarView
A highly customizable calendar view and compose library for Android. -
Balloon
:balloon: Modernized and sophisticated tooltips, fully customizable with an arrow and animations for Android. -
Kotterknife
Android view injection writen in Kotlin based on ButterKnife -
Shortbread
Android library that creates app shortcuts from annotations -
kotlin-android-template
Android + Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc = โค๏ธ -
NotyKT ๐๏ธ
๐ NotyKT is a complete ๐Kotlin-stack (Backend + Android) ๐ฑ application built to demonstrate the use of Modern development tools with best practices implementation๐ฆธ. -
Material Chip View
Material Chip view. Can be used as tags for categories, contacts or creating text clouds -
DrawableToolbox
๐ ๏ธ The missing drawable toolbox for Android. Create drawables programmatically and get rid of the boring and always repeated drawable.xml files. -
Navigation Toolbar for Android
:octocat: Navigation toolbar is a slide-modeled UI navigation controller made by @Ramotion -
CodeView
Display code with syntax highlighting :sparkles: in native way. -
Carousel Recyclerview
Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager. -
Pluto Debug Framework
Android Pluto is a on-device debugging framework for Android applications, which helps intercept Network calls, capture Crashes & ANRs, manipulate application data on-the-go, and much more. -
Android Kotlin Samples
Some basic samples of Kotlin for Android -
Pdf Viewer For Android
A Lightweight PDF Viewer Android library which only occupies around 125kb while most of the Pdf viewer occupies up to 16MB space. -
CrunchyCalendar โ awesome calendar widget for android apps
A beautiful material calendar with endless scroll, range selection and a lot more! -
Capturable
๐Jetpack Compose utility library for capturing Composable content and transforming it into Bitmap Image๐ผ๏ธ -
MaterialTimelineView
With MaterialTimelineView you can easily create a material looking timeline. -
sliding-panel
Android sliding panel that is part of the view hierarchy, not above it. -
MaterialDrawerKt
A Kotlin DSL wrapper around the mikepenz/MaterialDrawer library. -
Transition X
{ } Declarative Kotlin DSL for choreographing Android transitions -
SSComposeCookBook
A Collection of major Jetpack compose UI components which are commonly used.๐๐๐ -
Only
:bouquet: An easy way to persist and run code block only as many times as necessary on Android. -
SSCustomBottomNavigation
Animated TabBar with native control and Jetpack Navigation support..โจ๐๐ -
Swagger Gradle Codegen
๐ซ A Gradle Plugin to generate your networking code from Swagger -
Permission Flow for Android
Know about real-time state of a Android app Permissions with Kotlin Flow APIs. -
EasyPermissions-ktx
๐ Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher. -
Awesome Jetpack compose
A collaborative list of awesome jetpack compose resources. -
Nextflix-Composable
Includes jetpack compose, navigation, paging, hilt, retrofit, coil, coroutines, flow.. -
DeviceInfo-Sample
[Android Library] Get easy access to device information super fast, real quick -
Intro Showcase View
Highlight different features of the app using Jetpack Compose -
Aimybox voice assistant
Embeddable custom voice assistant for Android applications -
Events Calendar
Events Calendar is a user-friendly library that helps you achieve a cool Calendar UI with events mapping. You can customise every pixel of the calendar as per your wish and still achieve in implementing all the functionalities of the native android calendar in addition with adding dots to the calendar which represents the presence of an event on the respective dates. It can be done easily, you are just a few steps away from implementing your own badass looking Calendar for your very own project! -
ZoomHelper
ZoomHelper will make any view to be zoomable just like Instagram pinch-to-zoom -
SSCustomEditTextOutLineBorder
Same as the Outlined text fields presented on the Material Design page but with some dynamic changes. ๐ ๐ -
Mutekt
Simplify mutating "immutable" state models (a Kotlin multiplatform library) -
Maildroid
Maildroid is a small robust android library for sending emails using SMTP server -
Turtle ๐ข
Run shell commands from Kotlin scripts, apps or Gradle tasks with ease. -
Compose Compiler Reports to HTML Generator
A utility (Gradle Plugin + CLI) to convert Jetpack Compose compiler metrics and reports to beautified HTML page. -
TimelineView
A customizable and easy-to-use Timeline View library for Android. Works as a RecyclerView decorator (ItemDecoration) -
Vanilla Place Picker
Simple(vanilla) yet 'Do it all' place picker for your place picking needs in Android -
Crowdin Android SDK
Crowdin Android SDK delivers all new translations from Crowdin project to the application immediately -
Awesome Mobile Libraries
This repo contains all the Open-source Libraries from iOS, Android, Flutter and React-Native.โจ
Appwrite - The Open Source Firebase alternative introduces iOS support
Do you think we are missing an alternative of KAndroid or a related project?
README
KAndroid
Kotlin library for Android providing useful extensions to eliminate boilerplate code in Android SDK and focus on productivity.
Download
Download latest version with Gradle:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
implementation 'com.github.pawegio:KAndroid:[email protected]'
}
Usage
Binding views
// instead of findViewById(R.id.textView) as TextView
val textView = find<TextView>(R.id.textView)
Accessing ViewGroup children
/* instead of:
for (i in 0..layout - 1) {
layout.getChildAt(i).visibility = View.GONE
}
*/
layout.views.forEach { it.visibility = View.GONE }
TextWatcher
/* instead of:
editText.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
before()
}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
onChange()
}
override fun afterTextChanged(s: Editable?) {
after()
}
}) */
editText.textWatcher {
beforeTextChanged { text, start, count, after -> before() }
onTextChanged { text, start, before, count -> onChange() }
afterTextChanged { text -> after() }
}
SearchView extensions
/* instead of:
searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener {
override fun onQueryTextChange(q: String): Boolean {
update(q)
return false
}
override fun onQueryTextSubmit(q: String): Boolean {
return false
}
}) */
searchView.onQueryChange { query -> update(query) }
/* instead of:
searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener {
override fun onQueryTextChange(q: String): Boolean {
return false
}
override fun onQueryTextSubmit(q: String): Boolean {
update(q)
return false
}
}) */
searchView.onQuerySubmit { query -> update(query) }
SeekBar extension
/* instead of:
seekBar.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
override fun onStopTrackingTouch(seekBar: SeekBar) {
}
override fun onStartTrackingTouch(seekBar: SeekBar?) {
}
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
mediaPlayer.seekTo(progress)
}
}) */
seekBar.onProgressChanged { progress, fromUser ->
if (fromUser) mediaPlayer.seekTo(progress)
}
Using system services
// instead of getSystemService(Context.WINDOW_SERVICE) as WindowManager?
windowManager
// instead of getSystemService(Context.POWER_SERVICE) as PowerManager?
powerManager
// instead of getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager?
notificationManager
// instead of getSystemService(Context.USER_SERVICE) as UserManager?
userManager
// etc.
Toast messages
longToast("I'm long toast message!")
toast("Hi, I'm short one!")
longToast(R.string.my_string)
toast(R.string.my_string)
Layout inflater
// instead of LayoutInflater.from(context).inflate(R.layout.some_layout, null, false)
context.inflateLayout(R.layout.some_layout)
// or
context.inflateLayout(R.layout.some_layout, attachToRoot = true)
Using Intents
// instead of Intent(this, javaClass<SampleActivity>())
val intent = IntentFor<SampleActivity>(this)
// instead of startActivity(Intent(this, javaClass<SampleActivity>()))
startActivity<SampleActivity>()
// instead of startActivityForResult(Intent(this, javaClass<SampleActivity>()), REQUEST_CODE)
startActivityForResult<SampleActivity>(REQUEST_CODE)
Logging
// using javaClass.simpleName as a TAG
w("Warn log message")
e("Error log message")
wtf("WTF log message")
// using lambda log method
v { "Verbose log message" }
d { "Debug log message" }
i { "Info log message" }
// or with custom TAG
v("CustomTag", "Verbose log message with custom tag")
Threading
// instead of Thread(Runnable { /* long execution */ }).start()
runAsync {
// long execution
}
// delayed run (e.g. after 1000 millis)
// equals Handler().postDelayed(Runnable { /* delayed execution */ }, delayMillis)
runDelayed(1000) {
// delayed execution
}
// run on Main Thread outside Activity
// equals Handler(Looper.getMainLooper()).post(Runnable { /* UI update */ })
runOnUiThread {
// UI update
}
// delayed run on Main Thread
// equals Handler(Looper.getMainLooper()).postDelayed(Runnable { /* delayed UI update */ }, delayMillis)
runDelayedOnUiThread(5000) {
// delayed UI update
}
From/To API SDK
// instead of if (Build.VERSION.SDK_INT >= 21) { /* run methods available since API 21 */ }
fromApi(21) {
// run methods available since API 21
}
// instead of if (Build.VERSION.SDK_INT < 16) { /* handle devices using older APIs */ }
toApi(16) {
// handle devices running older APIs
}
// or
// instead of if (Build.VERSION.SDK_INT <= 16) { /* handle devices using older APIs */ }
toApi(16, inclusive = true) {
// handle devices running older APIs
}
Loading animation from xml
// instead of AnimationUtils.loadAnimation(applicationContext, R.anim.slide_in_left)
loadAnimation(R.anim.slide_in_left)
Animation listener
/*instead of:
animation.setAnimationListener(object : Animation.AnimationListener{
override fun onAnimationStart(animation: Animation?) {
onStart()
}
override fun onAnimationEnd(animation: Animation?) {
onEnd()
}
override fun onAnimationRepeat(animation: Animation) {
onRepeat()
}
})*/
animation.animListener {
onAnimationStart { onStart() }
onAnimationEnd { onEnd() }
onAnimationRepeat { onRepeat() }
}
Web intents with url validation
// instead of Intent(Intent.ACTION_VIEW, Uri.parse("http://github.com"))
WebIntent("http://github.com")
More
Under development so expect soon.
Apps using KAndroid
(contact me or create new pull request to add your apps)
License
Copyright 2015-2017 Paweล Gajda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*Note that all licence references and agreements mentioned in the KAndroid README section above
are relevant to that project's source code only.