Giter Site home page Giter Site logo

sheilazxx / autosystembar Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 4.0 2.46 MB

一句代码适配4.4以上沉浸状态栏和沉浸导航栏, 状态栏颜色和样式自动根据状态栏下面的背景颜色自动调整, 适配魅族,小米等国产手机.

Java 82.10% Kotlin 17.90%

autosystembar's Introduction

一句代码适配4.4以上沉浸状态栏和沉浸导航栏, 状态栏颜色和样式自动根据状态栏下面的背景颜色自动调整, 适配魅族,小米等国产手机.

Screenshot

Gradle

    compile 'cn.albert:autosystembar:1.0.1'

    compile 'com.android.support:appcompat-v7:version'
    compile "com.android.support:palette-v7:version"

Usage

    SystemBarHelper.Builder().into(activity)
    SystemBarHelper.Builder()
                    .statusBarColor()    // 设置状态栏颜色
                    .statusBarFontStyle()  // 设置状态栏时间,电量的风格, 6.0以上, 部分国产机可以不用6.0以上.
                    .navigationBarColor()  // 设置导航栏颜色
                    .enableImmersedStatusBar()  // 布局嵌入状态栏,例如图片嵌入状态栏
                    .enableImmersedNavigationBar()  // 布局嵌入导航栏,例如图片嵌入导航栏
                    .enableAutoSystemBar(false)  // 根据状态栏下面的背景颜色自动调整状态栏的颜色, 自动调整状态栏时间,电量的风格, 默认是开启的
                    .into(this)
   SystemBarHelper helper = SystemBarHelper.Builder().into(activity);
   helper.setNavigationBarColor()
   helper.setStatusBarColor()
   helper.statusBarFontStyle()
   helper.enableImmersedStatusBar()
   helper.enableImmersedNavigationBar()

Feature

  1. 根据状态栏下面的背景颜色自动调整状态栏的颜色
  2. 根据状态栏下面的背景颜色自动调整状态栏时间,电量等风格
  3. 设置图片嵌入状态栏,图片嵌入导航栏
  4. 修个状态栏的颜色和导航栏颜色

autosystembar's People

Contributors

sovegetables avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.