You can do this with an XML layout. If the three lists look different (for example, album has a picture and three rows of text, song has no picture and two rows of text, etc.), then make three xml files that describe the layouts. Setting the click listener is straightforward and is covered in various ListView tutorials. When the user clicks on an item, then get the appropriate ListView, load it with data (ArrayAdapter works well) and display it (setContentView is one way).
Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 28, 7:09 am, Alok <[email protected]> wrote: > Hi guys, > I am developing a music application where there will be almost 30 to > 35 lists . > Example .. > A list on page one say albums , artists etc etc > Then if you select one list item say Albums , you go on a new page > with Album list, when u click on one album listitem , u enter song > list.. that way . > each list item has an image associated with it . And the text for the > listitem may be 2 lines per item. And the text should be scrollable. > (Like Marquee) > Now my idea is to create a generic list which is common to all the > listview screens. > At runtime i should be able to pass the contents of each list to this > generic class. > What approach should i take? Can a XML layout solve this purpose.. > Please give me some guidelines. Reuse is my main aim.. And for each > listitem i should be able to handle click listeners.. > Please give me some guidelines. > Thanks in advance, > Alok. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

