2012-01-02 7 views
11

私のアプリの編集テキストに何かを書くと、ソフトキーボードは下の相対レイアウトと一緒に来ます。下の相対レイアウト位置を修正したいと思います。どんな助けでも大歓迎です。ソフトキーボードが来るときのボトムの相対レイアウトを修正する方法は?

+2

を貼り付けるには、いくつかのコードを置きます。 –

+0

にはXMLコードが必要です。 –

+0

まだ解決策はありますか? –

答えて

1

私はパドマ・クマールは、マニフェストアクティビティタグにandroid:windowSoftInputMode="adjustNothing"を意味推測している

android:softinputmode="adjustNothing" 
+1

私は下のレイアウトだけを修正する必要があります。同時に、他のすべてのビューは調整可能でなければなりません。私の編集テキストはユーザーに完全に表示されます。 – hacker

+0

私は同じ種類のソリューションも探しています@ハッカー –

17

のmanifest.xmlファイルであなたのアクティビティタグでこれを追加します。

+0

ああ、あなたは正しい。 –

+1

tsk tsk、これはどうやって投票が非常に多くなったのですか? 'adjustNothing'はオプションでもありません - http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft – Abhijit

1

、それを参照して、任意の高さの値を持つ偽のレイアウトを作成します:相対レイアウトで

<RelativeLayout 
    android:id="@+id/rl_fake" 
    android:layout_width="fill_parent" 
    android:layout_height="320dp" > 
</RelativeLayout> 

<RelativeLayout 
    android:id="@+id/rl_main_view" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" > 
    ... 
</RelativeLayout> 
... 
<RelativeLayout 
    android:id="@+id/rl_problem" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    android:layout_below="@+id/rl_fake" > 
    ... 
</RelativeLayout> 
0

は、次のコード

<LinearLayout 
     android:id="@+id/ll_button" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:gravity="center" 
     android:orientation="horizontal" 
     android:layout_marginTop="@dimen/_16dp"> 

     <Button 
      android:id="@+id/btn_continue" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:background="@color/colorPrimary" 
      android:text="@string/conti" 
      android:padding="@dimen/_8dp" 
      android:textColor="@color/white" 
      android:textSize="@dimen/_16sp" /> 
    </LinearLayout> 
関連する問題