I am getting overlapped Fragments in PageViewer of Android .
PFB my layout for PageViewer
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="900dp"
android:layout_alignParentBottom="true" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@android:id/tabs" >
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</android.support.v4.view.ViewPager>
</FrameLayout>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal" >
</TabWidget>
</RelativeLayout>
</TabHost>
I am calling it via my First Fragment Say FragmentA of first Tab . I need to replace it with Fragment A1 Calling this from the button click of list from BaseAdapter
Fragment duedateFrag = new FieldVisitFragment();
FragmentTransaction ft = fragmentActivity.getSupportFragmentManager().beginTransaction();
ft.replace(android.R.id.tabcontent, duedateFrag);
ft.commit();
My Fragment gets called but its overlapped on viewpager . The tabs runs from below the new Fragment . kindly help
On the hindsight , I think somewhere Nested Fragment or Child Fragment should come into play . Please guide.