上下元素环绕列表视图
Surround list view by upper and lower elements
列表视图的高度应该是图中白色space没有底部元素的高度。列表视图此时到达底部但不应该。所以基本上列表视图应该被上层元素和下层元素包围。我怎样才能实现这个目标?
目前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>
向 ListView 提及 android:layout_above:
<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:layout_above="@+id/groupchat_et_message"
android:background="#FFFFFF" />
列表视图的高度应该是图中白色space没有底部元素的高度。列表视图此时到达底部但不应该。所以基本上列表视图应该被上层元素和下层元素包围。我怎样才能实现这个目标?
目前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>
向 ListView 提及 android:layout_above:
<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:layout_above="@+id/groupchat_et_message"
android:background="#FFFFFF" />