2015-05-14 23 views
0

我的佈局具有如下結構:如何防止在鍵盤上方查看(adjustResize)?

enter image description here

在清單我有定義用戶對的EditText,其被包含在所述滾動型點擊後的鍵盤顯示器的行爲的屬性:

android:windowSoftInputMode="adjustResize" 

這裏是btnApply標記:

<LinearLayout 
    android:id="@+id/btnApply" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    android:layout_alignParentLeft="false" 
    android:layout_alignParentStart="true" 
    android:background="#00bbe3" 
    android:orientation="vertical" 
    android:layout_alignParentTop="false"> 

    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_gravity="center" 
     android:layout_margin="15dip" 
     android:text="Continue" 
     android:textColor="#ffffff" 
     android:textSize="23.75sp" 
     android:textStyle="bold" /> 
</LinearLayout> 

因此,btnApply漂浮在ScrollView頂部的鍵盤上方,如果它們不適合屏幕,我可以滾動所有EditText。

是否有可能使btnApply不能在鍵盤上方彈出並被按到屏幕的底部?

回答

0

試圖改變

機器人:windowSoftInputMode = 「adjustResize」

android:windowSoftInputMode="adjustPan" 

而且你不需要把EDITTEXT滾動型。

您只需簡單地添加

android:scrollbars = "vertical" 

您EDITTEXT

歡呼

相關問題