【问题标题】:How to achive a Listview layout as shown in picture?如何实现如图所示的 Listview 布局?
【发布时间】:2016-01-27 13:17:56
【问题描述】:

如何获得如上图所示的listview 布局?左侧和右侧的listview is scrollable 是我们点击列表视图项后得到的项目。

我已经搜索了很多,但我不知道如何实现这样的布局。请指导我。

【问题讨论】:

  • 看起来像一个主细节视图。可以在片段的帮助下实现
  • @Raghunandan 你能解释一下吗..!!谢谢
  • 旁白:“Seasonings”在您的应用中拼写错误。

标签: android android-layout listview


【解决方案1】:

做这样的事情

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >
  
  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
  //////ListView
  
  </LinearLayout>
  
  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
  
      ///It's detail
  </LinearLayout>
  
  
  </LinearLayout>
  put these in scroll view

【讨论】:

    【解决方案2】:

    该屏幕使用片段而不是 ListView。正如拉古南丹所说。

    你可以参考他提供的链接。

    你也可以参考这个——http://www.techotopia.com/index.php/An_Android_Master/Detail_Flow_Tutorial

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-19
      • 2020-10-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-19
      • 2011-11-06
      • 2013-11-16
      相关资源
      最近更新 更多