我有一個非常長的佈局來設計,我有它的設計和使用ScrollView,基本上它是1400dp長的佈局。我在我的活動中使用這個。我想在我的活動中實現一個固定頁腳,即使想要滾動要在頁面中固定的UI的頁面。添加一個固定頁腳到1400dp長佈局
這就是佈局代碼
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:orientation="vertical"
android:paddingBottom="8dp" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="1400dp"
android:columnCount="1"
android:orientation="vertical" >
...
</RelativeLayout>
</ScrollView>
我試圖頁腳(TextView的)添加至底部,然後它會隱藏滾動時。然後我試圖限制ScrollView,layout_height爲400dp,然後嘗試下面給出一個空白區域,但它不允許在那裏添加任何東西。 所以我的問題是,是否有可能在android佈局中添加修復頁腳。
只需將您的ScrollView包裹在LinearLayout中,並將頁腳置於底部。 – 323go