【发布时间】:2015-02-11 12:06:26
【问题描述】:
列表视图的高度应该是图片中的空白处,不包括底部元素的高度。列表视图目前到达底部,但不应该。所以基本上列表视图应该被上层元素和下层元素包围。我怎样才能实现这个目标?
XML 目前如下:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/groupchat_tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/groupchat_bt_edit"
android:layout_alignParentLeft="true" />
<Button
android:id="@+id/groupchat_bt_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="bearbeiten"
android:onClick="editButtonOnClick" />
<ListView
android:id="@+id/groupchat_lv_conversation"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/groupchat_bt_edit"
android:background="#FFFFFF" />
<EditText
android:id="@+id/groupchat_et_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="@+id/groupchat_bt_send" />
<Button
android:id="@+id/groupchat_bt_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:text="senden"
android:onClick="sendButtonOnClick" />
</RelativeLayout>
【问题讨论】:
标签: android xml android-listview android-relativelayout