Skip to content

otwayz/Softbar

Repository files navigation

Softbar

Statusbar dark & light mode change

用法

compile 'com.zgc:softbar:1.0.1'
public class BaseActivity extend Activity {
  	
    public void statusBarModeChange() {
        SoftBar.with(this).safeDarkFont(Color.WHITE);
    }
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.xxx);
        
        statusBarModeChange();
    }
    
    @Override
    protected void onDestroy() {
        SoftBar.release(this);
        super.onDestroy();
    }
    
}

功能

实现沉浸式 和 电池所在状态栏字体变色。 支持小米 魅族 5.0及以上系统 支持 Android 6.0及以上系统

Sample 图示

浅色模式

深色模式

沉浸模式

混淆

# softbar
-dontwarn com.otway.**
-keep class com.otway.**{*;}

About

Statusbar dark & light mode change

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published