Skip to content

Latest commit

 

History

History
92 lines (51 loc) · 1.48 KB

README_STATUS.md

File metadata and controls

92 lines (51 loc) · 1.48 KB

StatusBar

结合BaseActivity使用

设置状态栏

代码

setDarkTitle(
                false,
                R.color.color_666666, "状态栏"
            )

参数

参数 类型 概述
dark Boolean 状态栏文字颜色是黑色和白色
color Int 状态栏颜色
title String 标题栏颜色

透明状态栏

代码 (状态栏文字颜色是黑色和白色)

translucentWindow(false)

独立使用,不使用BaseActivity提供的

改变状态栏背景

statusBarColor(ContextCompat.getColor(this, R.color.color_666666))

效果

改变状态栏文字颜色为白色

darkMode(false)

效果

透明状态栏

immersive(0, true)

License

Copyright (C) AbnerMing, VipBase Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.