From 4314f000e61751f47916c12d9c89c778251e6689 Mon Sep 17 00:00:00 2001 From: Overkill <443517937@qq.com> Date: Thu, 27 Jun 2019 16:47:07 +0800 Subject: [PATCH] Update README.md Add download link and how to use in gradle --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f020de9..2410464 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # SafeArea + +[ ![Download](https://api.bintray.com/packages/xwh443517937/maven_android/safearea/images/download.svg?version=0.0.1) ](https://bintray.com/xwh443517937/maven_android/safearea/0.0.1/link) + Android lib can provide a view to handle system view insets(Such as: StatusBar, NavigationBar, etc).You can also use it to makeyour layout under system bar,And change the System UI's background color. This lib can make it easier to manage the System ui insets on android.It just like SafeArea on IOS. @@ -12,6 +15,11 @@ KitKat: Top is always equal to the status bar height, Bottom is alwats equal to After Kitkat: It can fit the right inset size, on all four direction. +Gradle: + + implementation 'cn.wenhao.xia:safearea:0.0.1' + + Example: In activity: @@ -84,9 +92,9 @@ Example: 1.You need to optional cast your helper to TranslucentSystemUIHelper: -val overSystemUIHelper = AppCompatOverSystemUIHelper() as? TranslucentSystemUIHelper + val overSystemUIHelper = AppCompatOverSystemUIHelper() as? TranslucentSystemUIHelper 2.The set the provider: -overSystemUIHelper?.safeAreaProvider = object : SafeAreaProvider {...} + overSystemUIHelper?.safeAreaProvider = object : SafeAreaProvider {...}