0
我有一个框架布局,其中我有一个列表视图,编辑文本和一个按钮,但现在我想把一个按钮放在列表视图上方布局的右上角,但我面对的是问题。我的xml是:在xml中的Android框架布局
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="86dp"
android:layout_gravity="bottom" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:text="Send" />
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/button1"
android:ems="10" />
</RelativeLayout>
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="317dp" >
</ListView>
</FrameLayout>
你似乎已经忘了介绍我想在右上角的布局添加按钮,您所遇到的问题, – Kuffs
但我无法做到这一点。 – Talib
你正在寻找的结果的屏幕截图会有所帮助。 – ssantos