Comments (3)
在华为荣耀7上,也会出现白条的情况
from android-titlebar.
mChildOfContent.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
public void onGlobalLayout() {
if (isfirst) {
contentHeight = mChildOfContent.getHeight();//兼容华为等机型
isfirst = false;
}
possiblyResizeChildOfContent();
}
});
改成
mChildOfContent.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
public void onGlobalLayout() {
if (isfirst) {
contentHeight = mChildOfContent.getRootView().getHeight();//兼容华为等机型
isfirst = false;
}
possiblyResizeChildOfContent();
}
});
之后OK了?
from android-titlebar.
一、条件
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手机左右),未见有此现象。
=========================================================================
在mate10 pro,
EMUI版本10.0.0,android版本10的机子上,
还是出现了会出现白条
from android-titlebar.
Related Issues (20)
- 希望可以设置出现跑马灯字数
- 点击删除按钮返回的是VOICE的actionCode HOT 1
- 不能代码中动态更改右侧的文字啊? HOT 1
- Programatically change titlebar:centerType="searchView" to Text
- 建议增强扩展性 HOT 1
- 建议新增textStyle 以及布局预览处理 HOT 1
- 标题的滚动位置是否有点太窄了,在没有右边菜单的时候看起来很不协调
- 怎么把menu.xml添加到title?
- 建议attr支持填充视图和主视图设置图片资源
- 代码怎么设置title
- 没办法动态设置rightType
- 我看错了
- vivo,oppo,系统在6.0以下,无法延伸至状态栏 HOT 1
- 怎么设置渐变色状态栏和标题栏 HOT 1
- 无法通过代码动态修改吗?
- 在HUAWEI nova 5 pro 文字不显示
- 与immersionbar 沉浸式框架冲突了
- 搜索框相关 HOT 1
- rendering sandbox error
- 无法预览xml很不方便 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-titlebar.