Ich habe eine Registerkarte Aktivität, wo ich zwei Registerkarten haben, die Registerkarte Position unter dem Layout, ich möchte die Registerkarte Positionen unterhalb der Aktionsleiste wie in Google Play und wenn ich von einem Tab bewegen zu einer anderen Registerkarte, zeigen die Daten von vorherigen Registerkarte, obwohl ich saveEnabled auf false festgelegt. ist hier mein CodeWie Registerkarte Position unter Aktionsleiste
TabHost tabHost = getTabHost(); // The activity TabHost
TabHost.TabSpec spec; // Reusable TabSpec for each tab
Intent intent; // Reusable Intent for each tab
// Do the same for the other tabs
intent = new Intent().setClass(this, RunningOrder.class);
spec = tabHost.newTabSpec("runningOrder")
.setIndicator("Running Order", res.getDrawable(R.drawable.running_order))
.setIndicator("Running Order")
.setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, OrderHistoryTab.class);
spec = tabHost
.newTabSpec("orderHistory")
.setIndicator("Order History",
res.getDrawable(R.drawable.history_icon))
.setContent(intent);
tabHost.addTab(spec);
//set tab which one you want open first time 0 or 1 or 2
tabHost.setCurrentTab(0);
Und das ist mein xml Layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical" >
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:saveEnabled="false"
android:layout_height="fill_parent"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:saveEnabled="false"
android:layout_weight="1"/>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:textAlignment="textStart"
android:saveEnabled="false"
android:layout_marginBottom="-4dp"/>
</LinearLayout>
danke es funktioniert !! – puja
und warum in der aktuellen Registerkarte zeigt es die vorherigen Tab-Daten – puja