My xml code is here,
<?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>
when i execute , i got like this,
after execute , when i enter the value on edit text ,the virtual keyboard is open and the entire mainlayout is scroll up, i got like this
But i except , the top layout not to scroll up , only the bottom layout or textview scroll up. i expect like this,
how to scroll only the edit view when open the virtual keyboard. ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…