首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在同一个活动中添加导航抽屉和选项卡小部件?

如何在同一个活动中添加导航抽屉和选项卡小部件?
EN

Stack Overflow用户
提问于 2013-12-31 15:05:45
回答 2查看 3.3K关注 0票数 0

我想添加滑动抽屉到操作栏和,标签小工具的应用程序。

我使用了Creating a Navigation Drawer

创建导航抽屉的指南。我试着将选项卡小部件添加到其中。但我不能。

有没有人可以帮我在操作栏后添加标签小工具?

就像这样。

这是xml文件。

代码语言:javascript
运行
复制
<android.support.v4.widget.DrawerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <!-- The main content view -->
    <FrameLayout
        android:id="@+id/content_frame"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
    <!-- The navigation drawer -->
    <ListView android:id="@+id/left_drawer"
        android:layout_width="240dp"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:choiceMode="singleChoice"
        android:divider="@android:color/transparent"
        android:dividerHeight="0dp"
        android:background="#111"/>
</android.support.v4.widget.DrawerLayout>

如何为此添加选项卡小部件作为提及布局?

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20853317

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档