Amis,RelativeLayout n'est pas Scrollable dans ScrollView
Vous ne savez pas pourquoi la mise en page suivante ne peut pas être défilée? J'ai un RelativeLayoput
dans un ScrollView
. Les vues correspondent à l'écran. Cependant, ils sont couverts chaque fois que le clavier apparaît. Je veux que l'écran de défilement lorsque le clavier apparaît, car il couvre le login et le mot de passe EditBoxes il est donc har de voir ce que quelqu'un est en train de taper
<?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="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<com.alarm.alarmmobile.android.view.RobotoLightTextView
android:id="@+id/passcode_login_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="20dp"
android:text="@string/passcode_login_body"
android:textAppearance="?android:attr/textAppearanceSmall" />
<EditText
android:id="@+id/passcode_login_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/passcode_login_text"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="20dp"
android:hint="@string/login_textview_username"
android:singleLine="true" />
<EditText
android:id="@+id/passcode_login_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/passcode_login_username"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:hint="@string/login_textview_password"
android:inputType="textPassword"
android:singleLine="true" />
<com.alarm.alarmmobile.android.view.RobotoLightButton
android:id="@+id/passcode_login_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/passcode_login_password"
android:layout_marginRight="16dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:text="@string/login_button_login" />
</RelativeLayout>
</ScrollView>
nous montrer comment on regarde –
Essayez de mettre 'android: orientation = « verticale »' dans le ScrollView. –
android: orientation = "vertical" ne le fixe pas. –