setOnClickListener

In this short code example below we will learn how to create ImageButton in Kotlin programmatically. A short code snippet in Kotlin below will cover: Create ImageView in a ConstraintLayout Load image from a resource Set onClickListener on ImageButton Change ImageButton image when the button is tapped For this example to work and to load an…

Read More Create ImageButton 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