2011-05-27 60 views
0

我創造這些項目如下:安卓:頂欄+ ViewFlipper +滾動型+底酒吧

<RelativeLayout android:id="@+id/relativeLayout1" 
    android:layout_width="fill_parent" android:layout_height="fill_parent" 
    android:background="@drawable/bg1" xmlns:android="http://schemas.android.com/apk/res/android"> 

<RelativeLayout android:id="@+id/relativeLayout2">top bar</RelativeLayout> 
<ViewFlipper android:id="@+id/details" 
     android:layout_below="@+id/relativeLayout2" android:layout_width="fill_parent" 
     android:layout_height="fill_parent"> 

    <RelativeLayout android:layout_width="fill_parent" 
      android:layout_height="fill_parent" android:id="@+id/relativeLayout3"> 

      <ScrollView android:layout_height="wrap_content" 
       android:fadingEdge="none" android:layout_width="fill_parent"> 
edittext and textview 

    </ScrollView> 

     </RelativeLayout> 
</ViewFlipper> 
    <RelativeLayout android:layout_height="wrap_content" 
     android:id="@+id/relativeLayout5" android:layout_width="fill_parent" 
     android:layout_gravity="bottom" 
     android:layout_alignParentBottom="true" android:background="@drawable/bar"> 
</RelativeLayout> 

當我點擊softinput模式打開,但底部欄顯示鍵盤上方的的EditText上。

請幫我。爲什麼底欄顯示鍵盤上方的

感謝

回答

1

也許嘗試在相關活動標籤設置windowSoftInputModeadjustPan?例如。

<activity android:windowSoftInputMode="adjustPan"> 

這應該防止佈局被軟件鍵盤調整大小。

+0

非常感謝。它的工作... – moon 2011-05-28 04:43:04

+0

在這種情況下,你能把這個問題標記爲Accepted嗎? (投票上/下按鈕附近的勾號)。 – 2011-05-28 07:50:53