Verschieben Sie die Textansicht nur, wenn die virtuelle Tastatur auf Android geöffnet ist
Mein XML-Code ist hier,
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/mainlayout" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:id="@+id/toplayout">
<ImageView
android:layout_width="wrap_content"
android:layout_height="100dp"
android:src="@drawable/bg" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:id="@+id/bottomlayout">
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="Enter value" />
</LinearLayout>
wenn ich ausführe, habe ich so,
Nach der Ausführung, wenn ich den Wert beim Bearbeiten von Text eingebe, ist die virtuelle Tastatur geöffnet und das gesamte Hauptlayout wird nach oben gescrollt
Aber ich nehme an, das obere Layout nicht nach oben zu scrollen, nur das untere Layout oder die Textansicht scrollen nach oben. ich erwarte so,
So scrollen Sie nur in der Bearbeitungsansicht, wenn Sie die virtuelle Tastatur öffnen. ?