• 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

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

 
The only cure for that is hours of television radiation. And this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic