Android KTX: A Dash of Kotlin Makes All the Difference!
summary
Android KTX is a Google‑maintained Jetpack library of Kotlin extensions that converts verbose framework calls into concise helpers, e.g., doOnEnd listener for Animator, operator get/set via [] for Bitmap pixels, and bundleOf to build Bundles. It ships modularly (core + feature modules), reached 1.0, inlines most helpers for negligible overhead, and covers drawable bounds, transition/listener lambdas, collection‑style ViewGroup APIs, drawToBitmap, shared‑prefs/edit, DB transaction wrapping, and reified getSystemService.
AI-written summary · about
chapters (22)
- 0:00Intro
- 0:52Kotlin extensions designed specifically for Android
- 1:35Makes Android development more concise, pleasant, and idiomatic
- 2:06Android has a long, co orful history
- 4:49Are we adding any new functionality?
- 5:45Are we leveraging Kotlin-specific language features?
- 6:30Will the extension be useful in the long-term?
- 7:32Does the extension provide a meaningful upgrade?
- 8:06Is the intent of the extension clear?
- 9:55A note about examples
- 10:21Named parameters & default values
- 14:08Operator Overloading
- 17:50Destructuring
- 20:29Pseudo Collections
- 24:38Making Life Easier / Discoverability
- 30:43Conflicts with your own extensions?
- 31:20What's good for core-ktx is not a value judgement on all extensions
- 32:01Should I still use Anko & Kotlin Android Extensions?
- 33:45Contributing to KTX
- 35:02They're "just" extensions
- 35:29Low barrier to entry
- 36:20Start with discussion
related talks
40mAndroid Jetpack: Sweetening Kotlin development with Android KTX
43mAndroid Jetpack ❤️ Kotlin: On the road to more wholesome APIs
21mGetting the most out of Android KTX
37mAndroid Jetpack Hearts Kotlin: on the road to more wholesome APIs
42mKotlin First – Taking Full Advantage of Kotlin For Android Development
01h 03mKotlin on Android
01h 13mModern Android development
49mKotlin: the swift of Android
