-1
Die Ansicht wird nach oben verschoben, wenn Sie auf EditText
klicken. Aber es bewegt sich nicht genug nach oben. Es sollte sich bis someId
bewegen, unter someId
sollte die Schaltfläche angezeigt werden und darunter sollte die keyboard
angezeigt werden. Warum funktioniert das nicht?Das Layout bewegt sich beim Klicken auf EditText nicht weiter
AndroidManifest:
<activity android:name=".MainActivity" android:windowSoftInputMode="adjustResize">
activity_main:
<?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">
<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_width="match_parent"
android:layout_height="400dp"
android:background="@android:color/holo_red_dark" />
<EditText
android:layout_width="match_parent"
android:layout_height="132dp"
android:padding="8dp"
android:background="@android:color/holo_green_dark"/>
<View
android:id="@+id/someId"
android:layout_width="match_parent"
android:layout_height="20dp" />
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<Button
android:id="@+id/btn_send"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="0dp"
android:layout_height="?attr/actionBarSize"
android:layout_weight="1"
android:background="@android:color/white"
android:clickable="false"
android:text="Test"
android:textColor="@color/defaultGreen"
android:textSize="18sp" />
</LinearLayout>
</RelativeLayout>