Reputation: 9415
I followed this tutorial to created a tab activity using fragments:
http://thepseudocoder.wordpress.com/2011/10/04/android-tabs-the-fragment-way/
One of the tabbed activities includes a list view; when you click on an item in the list view, it opens a new activity. But I want the new activity to still show the tabs that are in the tab activity. In other words, I want the tabs to show up on all the activities in the application, but I don't know how to make it persistent.
Would someone be able to point me in the right direction?
Upvotes: 1
Views: 1674
Reputation: 7636
To make your application persistent, make use of Inheritance
. create listView.xml
, tabactivity.xml
and embed those in MainActivity.xml
as below:
<LinearLayout ... >
<include layout="@layout/listView" /> // your listview.xml file will be called
<include layout="@layout/tabactivity" /> // your tabactivity.xml file will be called
</LinearLayout>
Upvotes: 1