[英]How to prevent auto scrolling of EditText when keyboard appears on Android?
Even i put scrollview or not, when my edit text request focus and keyboard appears, my view automatically scrolled to top a little bit. 甚至我是否放置了scrollview,当我的编辑文本请求焦点和键盘出现时,我的视图都会自动滚动到顶部。 It breaks my design. 它破坏了我的设计。 I have to prevent this. 我必须防止这种情况。
Could you please help me? 请你帮助我好吗?
Addthis 添加此
android:windowSoftInputMode="adjustPan"
android:isScrollContainer="false"
in the manifest file 在清单文件中
Add this line in your Manifext.xml under your activity tag and make sure your activity must not use android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" . 在您的Manifext.xml中的活动标记下添加此行,并确保您的活动不得使用android:theme =“ @ android:style / Theme.Black.NoTitleBar.Fullscreen” 。
android:windowSoftInputMode="adjustResize"
Please try it and let me know your comments if still you have problem..!! 请尝试一下,如果仍有问题,请告诉我您的评论.. !!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.