• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Custom ListView in Fragments

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

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
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ()

This is usually how it works....

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic