-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在某些手机下且使用沉浸标题模式下,底部会有一个高度=状态栏高度的白条。 #34
Comments
在华为荣耀7上,也会出现白条的情况 |
改成
之后OK了? |
|
一、条件
1、沉浸模式下
2、 红米1s(miui8.5) 和oppo A37m(ColorOS3.0)Android5.1下
3、界面有ScrollView下内嵌有EditText。
Activity 设置:android:windowSoftInputMode="stateHidden|adjustResize"
已经调用
@OverRide
public void onAttachedToWindow() {
super.onAttachedToWindow();
KeyboardConflictCompat.assistWindow(getWindow());
}
二、现象
当进入界面时,界面底部出现白条,高度=状态栏高度
调试发现:
KeyboardConflictCompat.KeyboardConflictCompat() 方法里面
代码
contentHeight = mChildOfContent.getHeight();
假设手机 h=1280px。
在出问题的机型里面,contentHeight = h - statusHeight
没有出现白条的手机,contentHeight = h
我把代码改为:
mChildOfContent.getRootView().getHeight();
都正常。
原因可能某些机型ROM有问题。
我在小米2s(MIUI9.2) 及其它厂商手机上(测试了10手机左右),未见有此现象。
The text was updated successfully, but these errors were encountered: