Ich habe ein Layout mit einigen Ansichten, von denen eine ist ein EditText. Das Layout passt leicht auf eine Seite, ABER, wenn die Soft-Tastatur aus ist, scrollt das Layout nicht. Hier ist eine kurze Zusammenfassung meiner Layout:Android: ScrollView scrollt nicht mit Tastatur
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background" >
<ScrollView
android:id="@+id/ScrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<CheckBox/>
<TextView/>
<LinearLayout>
<EditText>
<requestFocus />
</EditText>
</LinearLayout>
<TextView/>
<LinearLayout>
<Spinner/>
</LinearLayout>
</LinearLayout>
</ScrollView>
<Button
android:layout_alignParentBottom="true" />
</RelativeLayout>
Und in meinem Manifest habe ich das Attribut deklariert:
android:windowSoftInputMode="adjustResize|stateHidden"
Weiß jemand, warum es nicht funktioniert und wie Sie sicherstellen, funktioniert es?
Vielen Dank im Voraus!
für Android 5, lesen Sie diesen verwandten Artikel: [Android - scrollview anpassen, wenn die Tastatur für Android 5.0 (Lollipop) ist] (http://stackoverflow.com/questions/27167176/android-adjust-scrollview-when- Tastatur-ist-für-Android-5-0-Lollipop) –