Giter Club home page Giter Club logo

Comments (4)

gyf-dev avatar gyf-dev commented on July 22, 2024

@Y-JH 使用代码贴出来

from immersionbar.

Y-JH avatar Y-JH commented on July 22, 2024

好的 - 稍等:
@OverRide
protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.AppTheme);
super.onCreate(savedInstanceState);
ImmersionBar.with(this)
.statusBarDarkFont(true) //状态栏字体是深色,不写默认为亮色
.flymeOSStatusBarFontColor(R.color.color333) //修改flyme OS状态栏字体颜色
.keyboardEnable(true) //解决软键盘与底部输入框冲突问题,默认为false,还有一个重载方法,可以指定软键盘mode
.transparentBar() //透明状态栏和导航栏,不写默认状态栏为透明色,导航栏为黑色(设置此方法,fullScreen()方法自动为true)
.hideBar(BarHide.FLAG_SHOW_BAR) //隐藏状态栏或导航栏或两者,不写默认不隐藏
.init();
View rootView = LayoutInflater.from(this).inflate(getLayoutId(),null);
setContentView(rootView);
... ... ...

就这么多,在基类里面

from immersionbar.

gyf-dev avatar gyf-dev commented on July 22, 2024

@Y-JH fullScreen和hideBar方法不用写,默认就行,还有建议写在setContentView方法后面,参考demo里的基类:https://github.com/gyf-dev/ImmersionBar/blob/master/sample/src/main/java/com/gyf/immersionbar/activity/BaseActivity.java

from immersionbar.

Y-JH avatar Y-JH commented on July 22, 2024

十分感谢,按照上面的方法 问题解决了!

from immersionbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.