Android

In this Kotlin programming tutorial I am going to share with you how to create a RadioButton in Kotlin programmatically. We will create RadioGroup of 5 radio buttons with one set as default and when the view is loaded the default RadioButton will be selected. You will also learn how to create a RadioButton which…

Read More RadioButton Example in Kotlin

In this Kotlin code example we will learn how to create DatePicker in Kotlin programmatically. To break it in more details the code example below will cover:  Create DatePicker in LinearLayout Initialize DatePicker with current date( Year, Month and Day) When user changes the DatePicker values, call OnDateChangeListener and get input from the DatePicker Set DatePicker values…

Read More Create DatePicker in Kotlin

In this Kotlin code example we will learn how to create ImageView in Kotlin programmatically. The code example below will cover:  Create ImageView in a ConstraintLayout Load picture from a resource and add it to the ImageView For this example to work and to actually load an image, you will need to add at least…

Read More Create ImageView in Kotlin

Below is a very short tutorial on how to create RecyclerView in Kotlin programmatically. RecyclerView is a flexible view for providing a limited window into a large data set and learning how to create and use it make you even better Mobile App Developer :). The Kotlin code example below will cover: Create RecyclerView Create RecyclerAdapter Create a…

Read More Create RecyclerView in Kotlin Programmatically