【问题标题】:What controls should I use for this android UI?我应该为这个 android UI 使用什么控件?
【发布时间】:2012-09-02 22:06:16
【问题描述】:

我正在开发一个android应用,一个页面是这样的:

您可以在右上方看到一个“设置”按钮。点击后,左侧会弹出一个面板。

我是android新手,不知道该用什么组件。

【问题讨论】:

    标签: android user-interface components


    【解决方案1】:

    它被称为side navigationsliding menu。我相信是由 facebook 介绍的。

    这是一个如何设计的答案:

    Android Facebook style slide

    和项目代码:

    https://github.com/gitgrimbo/android-sliding-menu-demo

    我不只是搜索它并在此处粘贴链接,我实际上是在我的应用程序中这样做的,它很容易实现并且效果很好

    【讨论】:

    • android-sliding-menu-demo 非常好用
    【解决方案2】:

    您可以如下使用SlidingDrawer:

    <SlidingDrawer
        android:id="@+id/my_sliding_drawer"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_alignParentBottom="true"
        android:layout_margin="0dp"
        android:content="@+id/content"
        android:handle="@+id/handle" >
    
        <ImageButton
            android:id="@+id/handle">
            <!-- Your handle content comes here. -->
        </ImageButton>    
    
        <LinearLayout
            android:id="@+id/content">
            <!-- Your drawer contents come here. -->
        </LinearLayout>
    
    </SlidingDrawer>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-06-19
      • 2011-06-25
      • 1970-01-01
      • 2023-01-28
      • 2017-03-17
      • 1970-01-01
      • 2016-06-04
      • 2015-09-28
      相关资源
      最近更新 更多