我想要一个片段从右侧出现,每当我得到一个onListItemClick
事件,就像滑动菜单一样。假设我已经实现了这个片段;我怎样才能让它出现?我似乎无法弄清楚。感谢您的时间。我怎样才能动态添加一个片段
编辑: 这是一个ViewGroup这里我想补充的片段:
<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>
的TabViewPager是我加我的片段,当活动被实例化,ans是我需要动态添加我的新Fragment的地方。
yes..Maybe我不clear.I不想使用SlidingMenu API我有创建一个具有特定用户界面的片段,我希望它出现像slidingmenu(我的片段实现不slidingMenu)。它是关于添加一个片段的布局,但我似乎无法找到如何正确添加它,这就是为什么我询问 – Libathos
如果你想出现像,为什么你不使用SlidingMenu? – Marckaraujo
,因为这只是一个菜单我有一些textViews和其他东西的片段,不需要切换到SlidingMenu我只需要如何将其添加在我的layout.IF你可以帮助我,我会很感激 – Libathos