yangchong211 / ycstatusbar Goto Github PK
View Code? Open in Web Editor NEW关于状态栏方案总结案例,适合于绝大多数的使用场景……同时,兼容了小米,魅族等手机状态栏字体颜色设置失效问题。已经用于实际项目投资界,新芽,沙丘大学等APP,一键集成并使用!支持单Activity多Fragment动态修改状态栏颜色,入侵性低,一行代码即可实现你需要的需求
关于状态栏方案总结案例,适合于绝大多数的使用场景……同时,兼容了小米,魅族等手机状态栏字体颜色设置失效问题。已经用于实际项目投资界,新芽,沙丘大学等APP,一键集成并使用!支持单Activity多Fragment动态修改状态栏颜色,入侵性低,一行代码即可实现你需要的需求
activity嵌套多个fragment,例如下面情况:
第一个fragment:设置透明
其他fragment:都设置白色
问题:切换这三个fragment时,很明显的能够看到第一个fragment的布局上移,该如何解决
同一个activity,根据参数进行修改状态栏时,但北京修改为蓝色时,状态栏下方会有一个白条。
if ("blue".equals(statusBarColor)){
StateAppBar.setStatusBarColor(DentistryMallWebActivity.this,
ContextCompat.getColor(DentistryMallWebActivity.this,
R.color.color_517DF7));
}else if ("white".equals(statusBarColor)){
StateAppBar.setStatusBarColor(DentistryMallWebActivity.this,
ContextCompat.getColor(DentistryMallWebActivity.this,
R.color.white));
StatusBarUtils.StatusBarLightMode(DentistryMallWebActivity.this);
}
这是实现方式
StatusBarUtils.StatusBarLightMode(this);
StateAppBar.setStatusBarColor(this, ContextCompat.getColor(this,R.color.white));
我Fragment有一个标题 然后切换的时候 标题会挤上去
我是mainactivity+4fragment,里面有一个fragment顶部是图片。
由于状态栏底色是白的所以想把字体什么的设成黑色的。
Activity中包含多个fragment,跳转到其他activity,再次返回到fragment,Activity 中onresume 设置状态无效
小米手机正常,魅族m3s有点小问题
具体看readme
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.