【发布时间】:2014-05-09 17:47:56
【问题描述】:
我有一个Activity 和一个ScrollView,我想在它下面有一个页脚。
我试过这个:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
.......
</ScrollView>
<RelativeLayout
android:id="@+id/layout_footer1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<View
android:id="@+id/footer_topline"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#0075b5" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="84dp"
android:layout_height="42dp"
android:layout_marginBottom="15dp"
android:layout_marginLeft="10dp"
android:maxHeight="30dp"
android:maxWidth="30dp"
android:src="@drawable/logo" />
</RelativeLayout>
</RelativeLayout>
问题是,页脚与ScrollView 重叠。
我尝试在ScrollView 中使用android:layout_above="@id/layout_footer1",它在图形编辑器中似乎可以工作,但是当我尝试启动应用程序时,由于layout_footer1,它给了我一个未知的资源错误。
【问题讨论】:
标签: android android-layout footer android-relativelayout