![]() To start using Android KTX in your Android Kotlin projects, add the following to your app module's adle file: You can read the full API reference documentation on GitHub. There are many more places where Android KTX can simplify your code. Object : ViewTreeObserver.OnPreDrawListener ![]() ![]() Android KTX adds an extension function to the String class that allows you to convert strings to URIs more naturally. Normally, you'd call Uri.parse(uriString). Let's take a look at some examples of how Android KTX can help you write more natural and concise Kotlin code. The other parts of Android KTX that cover the Android Support Library will be available in upcoming Support Library releases. We invite you to try it out to give us your feedback and contributions. The portion of Android KTX that covers the Android framework is now available in our GitHub repo. Android KTX provides a nice API layer on top of both Android framework and Support Library to make writing your Kotlin code more natural. Posted by Jake Wharton ( Florina Muntenescu ( & James Lau ( we are announcing the preview of Android KTX - a set of extensions designed to make writing Kotlin code for Android more concise, idiomatic, and pleasant.
0 Comments
Leave a Reply. |