2017-07-28 58 views
0

我有多行EditTextScrollView。當顯示鍵盤時,我需要使整個EditText可見。現在它重疊顯示僅第一行的EditText的底部部分。 我已經在這裏閱讀了很多問題,試過adjustPan/adjustResize組合等,但沒有什麼幫助。軟鍵盤重疊多行編輯文本

+0

添加有問題的佈局。 –

回答

0

AndroidManifest.xml

<activity 
    android:configChanges="orientation|keyboardHidden|screenSize" 
    android:windowSoftInputMode="adjustResize" 
    ... 

windowSoftInputMode是關鍵,但我個人發現configChanges幫助了。

而且在Handling Input Method Visibility

0

一些更多的信息使用您的EditText以下XML代碼:

<EditText 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:paddingBottom="10dp"/> 
0

放置在頂層滾動型所有的意見,使內容可以滾動當屏幕沒有你的身材高大。爲了總體佈局的目的,假設屏幕的高度不是一個好主意。如果您希望您的內容能夠在所有屏幕尺寸和方向以及鍵盤狀態下滾動,請始終使用ScrollView。

3
<EditText 
     android:id="@+id/et_feedback" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="10dp" 
     android:lines="8" 
     android:maxLines="10" 
     android:minLines="6" 
     android:padding="10dp" 
     android:gravity="top|left" 
     android:inputType="textMultiLine" 
     android:background="@drawable/et_bg" 
     android:scrollbars="vertical" /> 
相關問題