我正在尝试创建一个特定的布局,它由滚动视图和底部的“页脚”两部分组成,但始终位于滚动视图的顶部。滚动视图中的所有内容都必须可见(通过滚动)。
这是我当前的代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/banner" />
<TextView
android:layout_width="fill_parent"
android:paddingTop="1dp"
android:layout_height="3px"
android:background="#DADADA" />
<RelativeLayout
android:id="@+id/InnerRelativeLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:text="Start Connecting" />
<Button
android:id="@+id/button01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/button1"
android:layout_alignParentLeft="true"
android:text="First use" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="Welcome to ADB Wireless!"
android:textSize="25sp" />
</RelativeLayout>
</LinearLayout>
但它在小屏幕和横向模式上给出了重叠。我只想将 2 个按钮放在“页脚”内。谢谢!