Why keyboard appear after the TabBar?
Asked Answered
L

3

6

In My application there is tabBar and the Edittext.

See below image:

Normal Screen:

enter image description here

And Image After press on edittext:

enter image description here

Now why this tabbar goes up with the keyboard. I want it to be remain fix at the bottom even if the user open the keyboard by pressing on edittext.

So what should i have to do ?

Please help e for that ?

My xml Layout for the TabBarMain activity is like below:

    <?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 for that.

Thanks.

Leper answered 31/1, 2012 at 9:2 Comment(2)
after adding the adjustPan doesn't your EditTextView disappear from the screen on top, please let me know how you resolved this.Huth
I've tried the solutions you've accepted but it is also hiding I mean shifting layout upwards. It's urgent to me.... How to fix this???Krystakrystal
A
13

Please use this

android:windowSoftInputMode="adjustPan"

in android menifest.xml file in your activity.

Example..

<activity
            android:name="Youractivity"
            android:windowSoftInputMode="adjustPan"/>
Aixenprovence answered 31/1, 2012 at 9:12 Comment(0)
D
2

set the following in your TabHost

android:isScrollContainer="false"
Dollydolman answered 31/1, 2012 at 9:12 Comment(0)
B
1

add stateUnchanged in your activity attribute windowsoftinputmode in manifest file, as below:

 <activity android:name="Youractivity"
        android:windowSoftInputMode="stateUnchanged"/>
Boldt answered 31/1, 2012 at 9:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.