I am creating a tabbed application and the main activity for one of the tabs is a listing of departments. When you click on a department it starts a new activity that lists the documents in the department.
My issue is when it shows the document listing, the tabbed view goes away. And I would like to keep the tabs on the top constantly. I have attempted to extend the TabActivity to each of the activities that are started under the tab, but then the listviews create over eachother.
I have also attempted to create the tabs without a tablistener starting an activity, so I can only create the listener if it is the first time the tab is called, but that is not allowed.
Any help would be appreciated, maybe there is some method I am completely missing?
Thank you!
Then you should not be starting an activity when the user taps on tab. Your tab contents should either be fragments or something else manipulated by your
TabListener. The concept of activities being the contents of tabs is now deprecated (and, IMHO, was a bad idea to begin with).You will notice that
TabActivityis deprecated, specifically for the activities-as-the-contents-of-tabs concept.