Showing posts with label ArrayAdapter. Show all posts
Showing posts with label ArrayAdapter. Show all posts

Thursday, January 10, 2013

How to create a Custom ListView In Android Application uisng ArrayAdapter

In this example, you can get to know how to create a custom list view using ArryaAdapter in android application development. I will create a custom header row for the list view and custom row for displaying android version image and version name. Once the row is clicked selected version name will be displayed in a Toast message.

Here is my listview_item_row.xml file. Place this file into layout directory under res folder.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >