Custom ListView in Fragments

Please suggest me how to create a custom Listview in Fragments for Tablet development (Android 3.0).

Please suggest some good links.

Thanks & Regards,
Gokul.K

Vishal Trivedi

Ranch Hand

Posts: 57

posted 5 years ago

I am sorry i did not understand what fragment means can you please elaborate

But here are steps that are roughly same for any kind of custom list

1. Add a listView to your main.xml(or the layout xml corresponding to your Activity class)
2. Make a CustomAdapter class by extending ArrayAdapter/BaseAdapter etc.
3. Implement its constructor (as per your needs) methods getItem and getView
4. Create your custom layout file
5. Make a ListView object and connect to your main layout by using findViewById
6. Create an object of your customAdapter and pass it as an object to setAdapter ()