I implemented a ActionBarSherlock with a ViewPager and a TabsAdapter. It works well but now I tried to \"push\" from a Framework Loaded in \"Tab 1\" another Fragment.
<I gotcha!
Let me explain, you need to put an id on your Layout that you want to replace, my example:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/Framelay"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/txtSearchTopic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="TextView" />
</FrameLayout>
So I just put mine: android:id="@+id/Framelay" Then I can use this Id to replace for the new fragment, what I mean is that all the content inside this Layout will be replaced by the new Fragment, as I called DetailFragment.
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager
.beginTransaction();
DetailFragment fragment3 = new DetailFragment();
fragmentTransaction.replace(R.id.Framelay, fragment3);
fragmentTransaction.commit();