Old way: New way: This is possible because of Kotlin synthetic imports. Just type the TextView's ID, that's it. Just make sure the TextView has an ID that matches the Kotlin code. For clarity, here is the Kotlin import:
Learn more about Kotlin for Android in my latest YouTube series: Android Studio with Kotlin.
Learn how to build an Ecommerce app in my latest YouTube series.
I started a new series. See here.
Learn to build an ecommerce app using ConstraintLayout, RecyclerView and Kotlin's data class.
Come along with me to Day 2 of Android Kotlin Bootcamp.
Want to learn Kotlin? Get started with my Kotlin Bootcamp series on YouTube.
Android Developers now have the option of using ConstraintLayout for all XML layouts. These replace RelativeLayout and LinearLayout. ConstraintLayout is much more complex, and has many features previous not available. Let's start by creating a project. Enter any Application Name, Company domain, and check Include Kotlin support. Choose API 21: Android 5.0 (Lollipop) from the […]
So you have a list of JSON data and you want to display that JSON in your Android app. See how with this video tutorial. A helpful tool to debug JSON data. Just copy and paste JSON in this website: https://jsonformatter.curiousconcept.com/ A good place to get sample JSON data: https://jsonplaceholder.typicode.com/