Giter Site home page Giter Site logo

statusbar's Introduction

StatusBar

一行代码的透明状态栏

使用文档 | 无法访问? | 下载体验

特点

  • 学习成本低
  • 启用/关闭透明状态栏
  • 状态栏背景/文字颜色
  • 状态栏/导航栏高度
  • 为View设置指定状态栏高度的Padding/Margin
  • 支持Activity/Fragment/DrawerLayout

安装

Project 的 settings.gradle 添加仓库

dependencyResolutionManagement {
    repositories {
        // ...
        maven { url 'https://jitpack.io' }
    }
}

Module 的 build.gradle 添加依赖框架

implementation 'com.github.liangjingkanji:StatusBar:2.0.5'

License

MIT License

Copyright (c) 2023 劉強東 https://github.com/liangjingkanji

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

statusbar's People

Contributors

hubrains avatar liangjingkanji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

statusbar's Issues

老哥,在CoordinatorLayout+AppBarLayout+Toolbar使用有点问题

我想让状态栏透明,文字黑色,在toolbar上方时候是和toolbar背景色一致的,当toolbar折叠的时候只能看到状态栏的文字,toolbar隐藏,就是我原来做的下面视频中的效果,但是是用的window.addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS)还要给toolbar写死顶部边距,用了你的库之后会是后面两张图上的效果,第一个就只是设置了immersive(toolbar),第二个是另外设置了android:statusBarColor和android:windowLightStatusBar的🤔

https://user-images.githubusercontent.com/54784104/148235284-f9af4112-b7b3-4da8-96ff-26e5d9f44a7b.mp4
微信图片_20220105223134
微信图片_20220105223128

在Fragment中如何使用

一般在MainActivity+BottomNavigationView+Fragment的页面结构中,假如首页Fragment的状态栏是白色,我的Fragment中状态栏是渐变色,那么如何在Fragment中使用?

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.