【问题标题】:Trying to accomplish this UI layout试图完成这个 UI 布局
【发布时间】:2014-12-08 18:53:36
【问题描述】:

我正在尝试为我的 android 应用程序组合以下屏幕布局。

(请原谅可怜的油漆工作:))

当用户点击左侧导航时,他们将获得在右侧显示的页面。

我想知道,我是否需要使用片段才能做到这一点? 我似乎无法获得正确的布局 - 无论它的线性/相对/网格看起来是否如此。 如果有人有类似的 XML 布局,这对我启动这个 UI 会很有帮助。

谢谢

【问题讨论】:

  • 详细信息部分会显示什么?一个全新的 UI 还是只是一个改变数据的 listView??
  • 是的,只是一个包含少量细节的列表视图
  • 很酷,那么我将只选择左侧具有线性布局的单个片段,用于显示 ABC 和右侧的列表视图。现在每次点击ABC。只需更改绑定到列表视图的适配器并通知它。 :-/
  • 滑动菜单抽屉。 Check这个了。
  • 希望我的问题能帮到你:stackoverflow.com/questions/25321168/…

标签: android android-layout


【解决方案1】:

我的布局是这样的

<LinearLayout
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="70.0dp"
        android:layout_height="match_parent">
     <!-- Control the width as you like -->
     <!-- Add your A ,B, c Layouts here -->
   </LinearLayout>
    <ListView
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</LinearLayout>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多