У меня есть RelativeLayout внутри ScrollView.На маленьких экранах вырезана верхняя часть формы (смотрите скриншоты ниже).В моем конкретном примере ярлык «Электронная почта» полностью скрыт на первом экране (320х240).
Есть ли у вас какие-либо идеи, как это исправить?
ps UPD: элементы управления формы должны быть в центре по вертикали.
Макет:
<ScrollView android:id="@+id/scrollView1" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/relLayout1" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_gravity="center">
<LinearLayout android:orientation="vertical"
android:layout_centerInParent="true" android:layout_width="fill_parent"
android:paddingLeft="10dip" android:paddingRight="10dip"
android:layout_gravity="center" android:layout_height="wrap_content">
<TextView android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:id="@+id/lblName" android:text="@string/user_email"></TextView>
<EditText android:inputType="textEmailAddress"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:id="@+id/edEmail">
<requestFocus></requestFocus>
</EditText>
<TextView android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:id="@+id/lblPassword" android:text="@string/user_password"></TextView>
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content" android:inputType="textPassword"
android:id="@+id/edPassword"></EditText>
<LinearLayout android:id="@+id/linearLayout3"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<CheckBox android:id="@+id/chkRememberMe"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="@string/remember_me"></CheckBox>
</LinearLayout>
<LinearLayout android:id="@+id/linearLayout2"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<Button android:id="@+id/btnLogin" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="@string/login"></Button>
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/btnRegister"
android:text="@string/register"></Button>
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="@string/restore_password"
android:id="@+id/btnRestorePassword"></Button>
</LinearLayout>
<TextView android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content" android:id="@+id/textView1"
android:layout_height="wrap_content" android:text="@string/register_prompt"></TextView>
</LinearLayout>
</RelativeLayout>
</ScrollView>