arguments Higher order functions Smart Cast Leverages Kotlin Features Optimizes Android APIs with Kotlin Makes Android Development - concise - enjoyable - intuitive lambdas
= Uri.parse(custom_string) Val uri = custom_string.toUri() import android.view.Menu import androidx.core.view.get import androidx.core.view.minusAssign fun myFunction(menu : Menu) { val firstMenuItem = menu[0] //Gets the first menu item. menu -= firstMenuItem // Removes the menu item } Menu Class • Core KTX • Fragment KTX • Palette KTX • Collections KTX • SQLite KTX • Navigation KTX Build.gradle implementation "androidx.core:core-ktx:$androidx_version"
UI Framework methods findViewById() Bind UI elements to the data sources in a declarative format Remove UI Framework methods <TextView android:text="@{viewmodel.userName}" />
App • Informative/action oriented • Timely reminders • Frequent interruptions are annoying Permissions <uses-permission> • Privacy of user • Permission to access sensitive user data • Dangerous permission on demand
Templated Show relevant app content in a dynamic, app theme user interface Interactive Enable user to perform inline, app actions, deep link, update, toggle Modular