Skip to content

KilleTom/BangScreenToolsMaster

Repository files navigation

BangScreenToolsMaster

This document describes how BangScreenTools work and how to use it. 
Document Web URL:https://blog.csdn.net/qq_29856589/article/details/83714642

How to used?

used way:https://jitpack.io/#KilleTom/BangScreenToolsMaster this web can telled your how many versions can provide to be used; but if you don't want to chose , you can copy this to use.

Init

Pasue this message in the builde.gradle(project)file:

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

Pasue this message in the builde.gradle(app)file:

	dependencies {
	        implementation 'com.github.KilleTom:BangScreenToolsMaster:v1.0.0'
	}

Use in Activity

make the statusbar was transparent

//used onCreat method
    BangScreenTools.getBangScreenTools().transparentStatusCutout(window, this)
//used onWindowFocusChanged method
    BangScreenTools.getBangScreenTools().windowChangeTransparentStatusCutout(window)

make the layout extend statusbar

//used onCreat method
    BangScreenTools.getBangScreenTools().extendStatusCutout(window, this)
//used onWindowFocusChanged method
    BangScreenTools.getBangScreenTools().windowChangeExtendStatusCutout(window)

make the layout was fullscreen

//used onCreat method
    BangScreenTools.getBangScreenTools().fullscreen(window, this)
//used onWindowFocusChanged method,this void is make fullscreen is worked.
    BangScreenTools.getBangScreenTools().windowChangeFullscreen(window)

make the layout not use bangscreen

//used onCreat method
    BangScreenTools.getBangScreenTools().blockDisplayCutout(window)

About

Android 刘海屏适配工具库、刘海屏幕多样式适配、刘海屏适配、Android 刘海屏适配工具类

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published