From 7604a8a1409596497482055820a0853ed8198ad6 Mon Sep 17 00:00:00 2001 From: Emerson Cloud Date: Thu, 18 Oct 2018 08:22:59 -0400 Subject: [PATCH] Remove references to wonderkiln and maven repository --- README.md | 65 ++++++++++++++++++++----------------------------------- 1 file changed, 24 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index e36e9f6..1fbba6b 100644 --- a/README.md +++ b/README.md @@ -30,16 +30,7 @@ BlurKit is faster than other blurring libraries due to a number of bitmap retrie This results in an average work/frame time of 2-4ms, which will be a seamless experience for most users and apps. ## Setup -First add this line to the repositories block to the app level `build.gradle`: -```groovy -repositories { - maven { - url "https://camerakit.bintray.com/other" - } -} -``` - -Then add __BlurKit__ to the dependencies block of the same app level `build.gradle`: +Add __BlurKit__ to the dependencies block of the app level `build.gradle`: ```groovy dependencies { implementation 'io.alterac.blurkit:blurkit:1.0.0' @@ -48,50 +39,42 @@ dependencies { ## Usage ### BlurLayout -Add a `BlurLayout` to your layout just like any other view. +Add a `BlurLayout` to your XML layout just like any other view. ```xml - - - - - + android:layout_height="150dp"/> ``` In the `Main_Activity.java` you need to override the `onStart()` and `onStop()` methods to include the `BlurLayout` functionality. ```java - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - blurLayout = findViewById(R.id.blurLayout); - } +BlurLayout blurLayout; - @Override - protected void onStart() { - super.onStart(); - blurLayout.startBlur(); +@Override +protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + blurLayout = findViewById(R.id.blurLayout); +} - } +@Override +protected void onStart() { + super.onStart(); + blurLayout.startBlur(); +} - @Override - protected void onStop() { - blurLayout.pauseBlur(); - super.onStop(); - } +@Override +protected void onStop() { + blurLayout.pauseBlur(); + super.onStop(); +} ``` The layout background will continuously blur the content behind it. If you know your background content will be somewhat static, you can set the layout `fps` to `0`. At any time you can re-blur the background content by calling `invalidate()` on the `BlurLayout`. ```xml -