2012-01-31 25 views
5

私のアプリケーションには、tabBarとEdittextがあります。TabBarの後にキーボードが表示されるのはなぜですか?

は、画像の下を参照してください:

通常画面:プレスした後

enter image description here

、画像をのEditTextに:

enter image description here

このタブバーは、キーボードを使って上がる理由。 ユーザがedittextを押してキーボードを開いても、底に固定しておきたいです。

どうすればよいですか?

どうすればよいですか? TabBarMain活性の

私のxmlレイアウトは以下のようなものです:

<?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> 

だから、そのために私を助けてください。

ありがとうございました。

+1

'adjustPan'を追加した後、あなたのEditTextViewが上の画面から消えませんトップ、私はあなたがこれをどのように解決したか教えてください。 – Anuj

+0

私はあなたが受け入れたソリューションを試しましたが、レイアウトを上にシフトさせることを意味していません。それは私に緊急です....これを修正する方法??? – Developer

答えて

13

で次のように設定してください。

例..

<activity 
      android:name="Youractivity" 
      android:windowSoftInputMode="adjustPan"/> 
2

は、あなたの活動のアンドロイドmenifest.xmlファイルでこの

android:windowSoftInputMode="adjustPan" 

を使用してくださいTabHost

android:isScrollContainer="false" 
1

があなたの活動にstateUnchangedを追加するには、以下のように、マニフェストファイルでwindowsoftinputmode属性:

<activity android:name="Youractivity" 
     android:windowSoftInputMode="stateUnchanged"/> 
関連する問題