Sadece bir ScrollView görünür olan bir düzen var. Çocuğu olarak göreli bir düzeni vardır. Bu mizanpajın, çocukları gibi birçok başka düzenleri (çoğunlukla metin görüntüleri) vardır. Metin yeterince büyük olmadığında, kaydırma görünümü tüm ekrana sığacak şekilde kendini genişletmez. Bunun yerine, arka planın gösterdiği altta bir boşluk gösterir. ScrollView üzerinde fillViewPort=true
ayarlamayı denedim, ancak bu sadece ekranı düzenlemek için ilk alt düzenini (RL1) yaptı.Çoklu alt düzenleri olan bir RelativeLayout ile ScrollView nasıl yapılır?
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_image">
<ProgressBar android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"/>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewPort="true"
android:scrollbars="none">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="10px">
<RelativeLayout android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="10px">
<!-- This layout is filling the screen if I set fillViewPort="true" -->
<RelativeLayout android:id="@+id/RL1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--TextViews and ImageViews -->
</RelativeLayout>
<RelativeLayout android:id="@+id/RL2"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--TextViews and ImageViews -->
</RelativeLayout>
<RelativeLayout android:id="@+id/RL3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<!--TextViews and ImageViews -->
</RelativeLayout>
<RelativeLayout android:id="@+id/RL4"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--TextViews and ImageViews -->
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
</ScrollView>
</FrameLayout>