Android implementation status bar white background black character effect example code

preface

This article mainly introduces the relevant contents about how to realize the black characters on the white background of the status bar on Android, and shares them for your reference and study. I won't say much below. Let's take a look at the detailed introduction together.

1、 Description

In the project, sometimes the background color of UI design status bar is white. Although it is very good-looking, it can pit our program, and many models need to be adapted. This article lists the status bar schemes compatible with multiple model versions.

2、 Status bar

1 just set the following code. I use it in baseactivetiy

2. The status bar is a compatible class. You can copy it directly

Black characters on white background

Translucent effect

3、 Precautions

During the adaptation, I encountered some abnormal problems after setting up a Huawei emui3.1 mobile phone. I think some third-party libraries also handle this version separately, which should be a problem. Therefore, I directly blocked the adaptation of this version in the project.

4、 Relevant information

Black words on a white background! Android light status bar black font mode

5、 Summary

The tool class of this article is copied from other places, which simplifies some unused code. If you need other code, just go to the link at point 4. This kind of code is copied, and you can't find where the original is..

Well, the above is the whole content of this article. I hope the content of this article has a certain reference value for your study or work. If you have any questions, you can leave a message. Thank you for your support for programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>