I am working on project, where i want to show multiple list view (different design layout using different layoutsa for lists) using one list adapter class, in one Main Activity class. Like i want to show first list view on first button click, and then i want to show second list view by hiding first list and visible second list view on second button click. How can i do it? It is possible? (Using one list adapter class in one activity class)

Re: show multiple list-views using one list-adapter class in single Activity 80 80

Yes, it can be done.
You want a generic ListAdapter. This will be useful if the data to show is the same or the change between them is not much. I could suggest how if I knew the data to show.

A solution to the in-Activity showing is to use fragments.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.