Why does the keyboard appear after the TabBar?

My application has tabBar and Edittext.

See image below:

Normal screen:

enter image description here

And the image After clicking on edittext:

enter image description here

Now why is this tab going up the keyboard. I want it to remain fixed below even if the user opens the keyboard by clicking on edittext.

So what should I do?

Please help with this?

My xml Layout for TabBarMain activity is as follows:

    <?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    >

    <LinearLayout
        android:id="@+id/LL1"
        android:orientation="vertical"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        >

       <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            />

      <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" 
            android:layout_gravity="bottom"
            android:layout_weight="0"/>

    </LinearLayout>

</TabHost> 

So please help me with this.

Thank.

+5
source share
3 answers

Please use this

android:windowSoftInputMode="adjustPan"

in the android menifest.xml file in your activity.

Example..

<activity
            android:name="Youractivity"
            android:windowSoftInputMode="adjustPan"/>
+13
source

set the following in TabHost:

android:isScrollContainer="false"
+2
source

stateUnchanged windowsoftinputmode , :

 <activity android:name="Youractivity"
        android:windowSoftInputMode="stateUnchanged"/>
+1

All Articles