-1

如何创建如下图所示的布局。是否有类似下图中的 ListView 示例?而且,如何在 android 的页脚处创建 Button?

谁能给我一些关于此图像中使用的内容的想法,我不明白。

布局

4

2 回答 2

3

RelativeLayout您可以使用, 并在其中将子视图相对于彼此以扁平(意味着有效和快速)结构排列来实现这样的结果:

你有

  • 一张logo图片alignParentTop = true
  • 设置为的security图像或按钮,layout_belowlogo
  • 一个control按钮alignParentBottom = true,最后
  • 设置为并设置为控制的list列表视图,具有of 。layout_belowsecuritylayout_abovelayout_heightfill-parentmatch-parent

编辑ListView上面的控件还使用自定义的项目渲染器持有 - 可能 -TextView一个自定义图像设置为drawableLeft

于 2012-05-16T07:01:10.593 回答
2

是的,我认为它是 ListView。尝试类似:

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
<TextView
        android:id="@+id/title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />


    <ListView
        android:id="@+id/list"
        android:layout_width="match_parent"
        android:layout_height="fill_parent"
        android:layout_above="@+id/footer"
        android:layout_below="@id/title" >
    </ListView>

<LinearLayout
        android:id="@id/footer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"/>
</LinearLayout>
于 2012-05-16T06:59:46.650 回答