2

我想知道图像中实现的 Android Activity 的类型是什么,您可以在其中放置例如配置并使用滑动手势隐藏它

在此处输入图像描述

4

3 回答 3

3

看起来Navigation Drawer,这Navigation Drawer是一个从屏幕左边缘过渡并显示应用程序的主要导航选项的面板。

有关更多信息,您可以访问开发者链接

在此处输入图像描述

在此处输入图像描述

以下是 GitHub 链接,您可以在其中找到Navigation Drawer源代码

导航抽屉源码链接1

导航抽屉源码链接2

导航抽屉源码链接3

导航抽屉源码链接4

更多收藏

于 2013-05-23T04:05:02.873 回答
3

它是Navigation Drawer一个面板,它从屏幕的左边缘过渡并显示应用程序的主要导航选项。

在此处输入图像描述

您可以在此处找到如何创建导航抽屉

<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>

抽屉视图(ListView)必须使用 android:layout_gravity 属性指定其水平重力。要支持从右到左 (RTL) 语言,请使用“start”而不是“left”指定值(因此当布局为 RTL 时,抽屉会出现在右侧)。

于 2013-05-23T04:05:40.503 回答
1

这被称为滑动菜单或导航抽屉

谷歌上周发布了他们自己的实现:http: //developer.android.com/training/implementing-navigation/nav-drawer.html

在此之前最流行的实现可能是这个SlidingMenu组件

于 2013-05-23T04:03:05.177 回答