我在应用程序中使用WebView加载网页,页面底部有EditText和Button。当我按EditText时,将显示软输入法,但输入法隐藏了EditText和Button。
我希望EditText和Button移到输入法的顶部,这样输入法就不会隐藏它们。
我在AndroidManifest.xml中将android:windowSoftInputMode="adjustPan"添加到我的活动标记中,但它不起作用。
我还能做什么?
发布于 2012-06-15 20:10:49
与其使用adjustPan属性,不如尝试使用下面的property.It。
android:windowSoftInputMode="adjustResize"发布于 2012-06-15 18:48:45
试着把你的webview放在ScrollView布局中。一旦键盘出现,滚动布局就会向上移动。请记住,在ScrollView布局中只能有一个子级。最好在Scrollview中放置一些布局,如线性或相对,然后在该布局中添加其他子视图。
看看这些:
Scrollview vertical and horizontal in android
http://www.androidaspect.com/2012/02/scrollview-tutorial-android-ui.html
https://stackoverflow.com/questions/11049124
复制相似问题