Simon
Simon

Reputation: 41

android questions about poping the soft keyboard

i want the whole layout move up to show while popping the soft keyboard, but the button on the bottom of the view cannot be seen.

the AndroidManifest.xml:

    <activity
    android:name="cn.duckr.android.plan.PlanConfirmPaymentActivity"
    android:windowSoftInputMode="adjustPan"
    style="@style/base_activity_style"
    android:theme="@style/confirm_payment_anim_theme" />

Upvotes: 0

Views: 44

Answers (2)

Nizamuddin Mohamed
Nizamuddin Mohamed

Reputation: 1

You can put whole layout except the particular button in a ScrollView to achieve this.

like this

<?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:orientation="vertical">
     <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/scrollView5"
        android:fillViewport="true">

            //put your contents here..      
     </ScrollView>

     <ImageButton
           android:id="@+id/ibSample"
           android:layout_width="50dp"
           android:layout_height="50dp"
           android:adjustViewBounds="true"/>

</RelativeLayout>

Upvotes: 0

Emil
Emil

Reputation: 2806

To ensure that the system resizes your layout to the available space—which ensures that all of your layout content is accessible (even though it probably requires scrolling)—use "adjustResize".

link

 android:windowSoftInputMode="adjustResize"

Upvotes: 0

Related Questions