[英]Layout not pushed up when Soft keyboard appears
將您的Parent LinearLayout放在scrollview中。 這解決了我的問題。
將您的基本布局放在ScrollView中
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/llPlayersName"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
// do here the layout work
</LinearLayout>
</ScrollView>
請記住scrollView cannon可用作基本布局,因此您必須將scrollView放在LinearLayout或RelativeLayout中。
在您的活動的清單條目中,添加
<activity ...
android:windowSoftInputMode="adjustPan">
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.