ListView ? BaseAdapter ?
Steps to create a ListView Image Title Content Image Title Content Prepare data Sources[Images + Titles + Description] Define appearance of a single row in xml Create a Custom adapter that maps data from the data source to single row Set Adapter to the ListView Decide what happens when the user clicks on an item. Image Title Content Image Title Content Image Title Content Image Title Content ListView
Step 1: Prepare the data sources Class ContactModel{ String image; String title; String content; // override getter setter Methods } ArrayList<ContactModel> contact =new ArrayList<ContactModel>(); Create Model or Class to contain all the data of adapter view. Make ArrayList of Object type (Class or Model of first step). Set values to ArrayList. Pass data in new Object Adapter Class through Constructor. ContactAdapter contactAdapter = new ContactAdapter(context,contact)
Step 2: Define the appearance of a Single row ImageView TextView 2 TextView 2 Single Layout Xml
Step 3: Create Custom Adapter Create class that extends BaseAdapter Implement all the methods Use the getView method to map the data sources to the Views of a single row.
Step 4: Set Adapter to ListView listView.setAdapter(contactAdapter);
Questions ?