AppCompatActivity

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

In this very short blog post I am going to share with you how to create and add Button in Kotlin programmatically. To break it down in more details the code example below will cover: Create Button programmatically in Kotlin Handle Button onClick events Change Button background color Change Button text color Add a Button…

Read More Create Button in Kotlin Programmatically