jeudi 14 mai 2015

How to prevent View above the keyboard (adjustResize)?

My layout has the following structure:

enter image description here

In the manifest I have an attribute that defines the behavior of the keyboard display after the user clicked on the EditText, which is contained in the ScrollView:

android:windowSoftInputMode="adjustResize"

Here is btnApply markup:

<LinearLayout
    android:id="@+id/btnApply"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="false"
    android:layout_alignParentStart="true"
    android:background="#00bbe3"
    android:orientation="vertical"
    android:layout_alignParentTop="false">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_margin="15dip"
        android:text="Continue"
        android:textColor="#ffffff"
        android:textSize="23.75sp"
        android:textStyle="bold" />
</LinearLayout>

So, btnApply floats above the keyboard on top of the ScrollView, and I can scroll all of the EditText's if they don't fit on the screen.

Is it possible to make btnApply doesn't pop up above the keyboard and was pressed to the bottom of the screen?

Aucun commentaire:

Enregistrer un commentaire