У меня есть представление прокрутки, которое я хотел бы заполнить на весь экран, у меня есть база LinearLayout
, затем внутри этого ScrollView
, а затем внутри этого единственного LinearLayout
, содержащего несколько текстовых полей и меток. Я работаю на уровне API 8. На эмуляторе я получаю следующее:
Так что ScrollView
должен идти до самого дна, но я не могу понять, что заставляет его не занимать все пространство на экране? У кого-нибудь есть предложения?
Ниже приведен код моего макета:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:layout_height="wrap_content"
android:id="@+id/textView1"
android:text="@string/create_account_header"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="wrap_content" android:textStyle="bold">
</TextView>
<TextView android:layout_height="wrap_content" android:id="@+id/textView2" android:textAppearance="?android:attr/textAppearanceMedium" android:layout_width="wrap_content" android:text="@string/enter_email"></TextView>
<EditText android:inputType="textEmailAddress" android:layout_height="wrap_content" android:layout_width="match_parent" android:id="@+id/emailAddress"></EditText>
<TextView android:layout_height="wrap_content" android:id="@+id/textView3" android:textAppearance="?android:attr/textAppearanceMedium" android:layout_width="wrap_content" android:text="Email Address Again:"></TextView>
<EditText android:layout_height="wrap_content" android:layout_width="match_parent" android:inputType="textEmailAddress" android:id="@+id/emailAddressConfirmation">
<requestFocus></requestFocus>
</EditText>
<TextView android:layout_height="wrap_content" android:id="@+id/textView6" android:textAppearance="?android:attr/textAppearanceMedium" android:layout_width="wrap_content" android:text="Username:"></TextView>
<EditText android:inputType="textPersonName" android:layout_height="wrap_content" android:id="@+id/editText1" android:layout_width="match_parent"></EditText>
<TextView android:layout_height="wrap_content" android:id="@+id/textView4" android:textAppearance="?android:attr/textAppearanceMedium" android:layout_width="wrap_content" android:text="Password:"></TextView>
<EditText android:layout_height="wrap_content" android:layout_width="match_parent" android:inputType="textPassword" android:id="@+id/password"></EditText>
<TextView android:layout_height="wrap_content" android:id="@+id/textView5" android:textAppearance="?android:attr/textAppearanceMedium" android:layout_width="wrap_content" android:text="Confirm Password:"></TextView>
<EditText android:layout_height="wrap_content" android:layout_width="match_parent" android:inputType="textPassword" android:id="@+id/passwordConfirmation"></EditText>
<ImageButton android:src="@drawable/generic_image" android:layout_width="wrap_content" android:id="@+id/imageButton1" android:layout_height="wrap_content"></ImageButton>
</LinearLayout>
</ScrollView>
</LinearLayout>