• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Multiple instqances of Layout view in single activity

manvinder

Newbie
Hi all,

I have created an Activity. the layout contains a list view. I m able to show records on it. now i want multiple instaces of list view with varying data. Data should not be lost when view is switched from on to andother.

Thanks and regards
 
You can call setContentView() more than once.... I think that's what you're looking for.

But you may want to change activities, it all depends on how the user will want to see things and have the app react.

It is of course wise to plan on having your activities save data in onPause(), onStop() and onDestroy() and react appropriately when the activity is restarted, no matter which way you choose to display your content.


hth
 
Back
Top Bottom