Posts

Showing posts with the label Custom ListView Kotlin

Custom ListView with item click listener (Kotlin)

Image
How to create a ListView with image title and description and handle on item clicks, in Kotlin, using Android Studio?       DESCRIPTION       In this tutorial we will learn how to make custom ListView with image , title , description , and handle item clicks . I'm displaying Toast on item clicks you can do your own functionality such as going to some activity etc.        VIDEO              SOURCE CODE       Step 1:  Create a new project   OR   Open your project Step 2:  Add some images in res>drawable folder Step 3:  Create a new "Android Resource File" in res>layout and name it as row.xml Step 4: Create two Kotlin classes named as "Model.kt", and "MyListAdapter.kt" Step 5: Code row.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" ...