[英]EditText not showing fully when keyboard is showing
將此添加到清單部分。
<activity
android:windowSoftInputMode="stateHidden|adjustPan|adjustNothing"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
/>
活動的主窗口未調整大小以為軟鍵盤騰出空間。 而是,窗口的內容會自動平移,以使當前焦點不會被鍵盤遮擋,並且用戶始終可以看到他們正在鍵入的內容。 通常,這不如調整大小那么可取,因為用戶可能需要關閉軟鍵盤才能到達窗口的模糊部分並與之交互。
試試這個讓你這樣的布局
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
// add here all your controls
</LinearLayout>
</ScrollView>
並在清單文件中添加您的活動
<activity
android:name=".SignupActivity"
android:parentActivityName=".MainActivity"
android:windowSoftInputMode="stateHidden|adjustResize"
android:configChanges="keyboardHidden|orientation|screenSize"/>
嘗試這個:
<activity
android:name=".activityname"
android:windowSoftInputMode="adjustPan|adjustResize" ></activity>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.