LinearLayout

In this short Kotlin programming tutorial we will learn how to create a Switch in Kotlin programmatically. In the code example below we are going to cover: Create Switch and add it to a LinearLayout Get input from the Switch when it’s state is changed  Set textOff and textOn text programmatically Set OnClickListener on the…

Read More Create a Switch in Kotlin Programmatically

In this short Kotlin code example we will learn how to create a single CardView in Kotlin programmatically. CardView is a FrameLayout with a rounded corner background and shadow. You can add multiple views into a CardView and then show them in a list one under another.  We will make a quotation card containing quote and…

Read More Create CardView in Kotlin Programmatically