2012-05-24 53 views
3

我正在動態地將視圖(RelativeLayoutEditText)添加到FrameLayout中,並使用setTranslate方法設置它們的位置。但屏幕上的鍵盤與我的EditText重疊。當我動態添加視圖時,EditText上的鍵盤重疊

我試圖設置

android:windowSoftInputMode="stateHidden|adjustResize|adjustPan" 
清單中

,但仍然沒有結果。我正在使用11 SDK。

如何解決這個問題?

這裏是screeshots:

enter image description here enter image description here

+0

解決您的問題? –

回答

2

正如你已經嘗試過Android的活動:windowSoftInputMode在你的清單。您可以通過換款的佈局相對做到這一點,讓你的EditText 機器人:layout_alignParentBottom =「真」

請參閱本Example

2

<ScrollView>環繞你的相對佈局。

1

把你的看法放在這裏面。 ScrollView只接受一個孩子,所以你可能需要將所有的組件添加到一個LinearLayout中,然後在ScrollView中添加LinearLayout。

<ScrollView 
android:layout_width="fill_parent" 
android:layout_height="fill_parent"> 


</ScrollView> 

如果這不是你要找的內容,然後添加

android:layout_alignParentBottom="true" 
相關問題