[英]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.