Posts

Showing posts with the label Custom ListView with item click listener

Custom ListView with SearchView on ActionBar/Toolbar & onItemClick listener - Android Studio

Image
     DESCRIPTION      This Tutorial will cover: ✔ListView(Image, Title, Description) ✔Filterable ListView ✔SearchView on ActionBar/Toolbar to search ListView items ✔Intent to go to NewActivity onItemClick ✔BackButton in ActionBar of NewActivity      VIDEO           SOURCE CODE      Step 1:  Create a new project   OR   Open your project Step 2:  Create New Activity File>New>Activity>EmptyActivity Step 3:  Create  menu.xml  under   res>menu   folder, to   search   item. Step 4:  Create  model.xml  in   res>layout   folder,   to design row Step 5: Place some images in res>drawable folder Step 5: Code: AndroidMenifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android= "http://schemas.android.com/apk/res/android" package= "com.blogspot....

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" ...

Custom ListView with item click listener

Image
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. 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: Code row.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" android:orientation= "horizontal" android:padding= "4dp" android:layout_width= "match_parent" android:layout_height= "match_parent" > <ImageView android:layout_width= "60dp" android:layout_height= "60dp" android:padding= "5dp" android:id= "@+id...