Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/214.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 当键盘出现时,ActionBar正在隐藏_Android_Actionbarsherlock - Fatal编程技术网

Android 当键盘出现时,ActionBar正在隐藏

Android 当键盘出现时,ActionBar正在隐藏,android,actionbarsherlock,Android,Actionbarsherlock,我用的是ActionBarSherlockwindowSoftInputMode是adjustPan(我也尝试过adjustResize和adjustNothing) 当键盘出现时,我想保持ActionBar在屏幕上,但要滑动我的布局(使文本保持可见) 下面是它的外观: 当键盘出现时: 问题是:如何在使用adjustPan时保持ActionBar可见(这样EditTexts将始终可见) 注意 我无法使用滚动视图来保存我的视图看起来布局向上滑动,以便为键盘留出一些空间。请尝试: 将此添加到ma

我用的是ActionBarSherlock
windowSoftInputMode
adjustPan
(我也尝试过
adjustResize
adjustNothing

当键盘出现时,我想保持
ActionBar
在屏幕上,但要滑动我的布局(使文本保持可见)

下面是它的外观:

当键盘出现时:

问题是:如何在使用
adjustPan
时保持
ActionBar
可见(这样
EditText
s将始终可见)

注意
我无法使用
滚动视图
来保存我的
视图

看起来布局向上滑动,以便为键盘留出一些空间。请尝试:

将此添加到manifest.xml:

<activity android:name=".YourActivity" android:label="@string/app_name" android:configChanges="keyboardHidden|orientation|keyboard" />

我发现,当您将
全屏标记应用于
活动的
窗口时,
调整大小
可能存在问题(出于某种原因,它只是使用
调整span
):

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
            WindowManager.LayoutParams.FLAG_FULLSCREEN);

没有这条线,调整大小就可以了。

你完成了吗?我也有一个类似的问题。@KuangYuang检查一下被接受的答案,它是好的和有帮助的;但是,对于adjustPan,它没有帮助嗨,我面临同样的问题,它应该如何使用?我没有得到:)那是一行非常痛苦的代码。浪费了我的两个小时。没有这行,调整大小很好