I want a fragment to appear from the right whenever I get an onListItemClick
event, like a sliding menu. Suppose that I've implemented the fragment; how can i get it to appear? I can't seem to figure it out. Thank you for your time.
EDIT: this is the viewGroup where i want to add the fragment:
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="horizontal" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="0dp"
android:layout_height="0dp" />
<android.support.v4.view.ViewPager
android:id="@+id/tabviewpager"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp" >
</android.support.v4.view.ViewPager>
</LinearLayout>
</TabHost>
the TabViewPager is where I add my Fragments when the activity is instantiated,ans is where I need to add my new Fragment dynamically.