Skip to content

Commit e03c584

Browse files
committed
Update README buttons and code
1 parent 2daffec commit e03c584

File tree

2 files changed

+13
-31
lines changed

2 files changed

+13
-31
lines changed
Lines changed: 1 addition & 0 deletions
Loading

README.md

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@
33
</p>
44

55
<p align="center">
6+
<a href="https://spectrum.chat/camerakit/blurkit/">
7+
<img alt="Join Spectrum" height="42px" src=".repo/bk-gh-readme-spectrum-button.svg" >
8+
</a>
69
<a href="https://buddy.works/" target="_blank">
7-
<img alt='Buddy.Works' height="42px" src='https://assets.buddy.works/automated-dark.svg'/>
10+
<img alt='Buddy.Works' height="41px" src='https://assets.buddy.works/automated-dark.svg'/>
811
</a>
912
</p>
1013

11-
<p align="center">
12-
<a href="https://join-slack.camerakit.website"><img src="https://join-slack.camerakit.website/badge.svg" alt="Join Slack"></a>
13-
<a href="https://codeclimate.com/github/CameraKit/blurkit-android/test_coverage"><img src="https://api.codeclimate.com/v1/badges/19e4407035c3b55f1bdb/test_coverage" alt="Code Climate Test Coverage"></a>
14-
<a href="https://codeclimate.com/github/CameraKit/blurkit-android/maintainability"><img src="https://api.codeclimate.com/v1/badges/19e4407035c3b55f1bdb/maintainability" alt="Code Climate Maintainability"></a>
15-
</p>
16-
1714
## What Is BlurKit?
1815
BlurKit is an extraordinarily easy to use and performant utility to render real time blur effects in Android.
1916

@@ -33,16 +30,11 @@ BlurKit is faster than other blurring libraries due to a number of bitmap retrie
3330
This results in an average work/frame time of 2-4ms, which will be a seamless experience for most users and apps.
3431

3532
## Setup
36-
Add __BlurKit__ to your dependencies block:
37-
```groovy
38-
compile 'com.alterac.blurkit:blurkit-core:1.0.0'
39-
```
40-
41-
You also need to add __RenderScript__ to your app module. Add these lines to the `defaultConfig` block of your __build.gradle__.
42-
33+
Add __BlurKit__ to the dependencies block of your app level `build.gradle`:
4334
```groovy
44-
renderscriptTargetApi 24
45-
renderscriptSupportModeEnabled true
35+
dependencies {
36+
implementation 'io.alterac.blurkit:blurkit:1.0.0'
37+
}
4638
```
4739

4840
## Usage
@@ -64,7 +56,7 @@ Add a `BlurLayout` to your layout just like any other view.
6456

6557
</com.wonderkiln.blurkit.BlurLayout>
6658
```
67-
In the `Main_Activity.java` you need to override the `onStart()` and `onStop()` methods to include the `BlurLayout`.
59+
In the `Main_Activity.java` you need to override the `onStart()` and `onStop()` methods to include the `BlurLayout` functionality.
6860
```java
6961
@Override
7062
protected void onCreate(Bundle savedInstanceState) {
@@ -82,15 +74,15 @@ In the `Main_Activity.java` you need to override the `onStart()` and `onStop()`
8274

8375
@Override
8476
protected void onStop() {
85-
super.onStop();
8677
blurLayout.pauseBlur();
78+
super.onStop();
8779
}
8880
```
8981

9082
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`.
9183

9284
```xml
93-
<com.wonderkiln.blurkit.BlurLayout xmlns:blurkit="http://schemas.android.com/apk/res-auto"
85+
<io.alterac.blurkit.BlurLayout xmlns:blurkit="http://schemas.android.com/apk/res-auto"
9486
android:id="@+id/blurLayout"
9587
android:layout_width="150dp"
9688
android:layout_height="150dp"
@@ -100,7 +92,7 @@ The layout background will continuously blur the content behind it. If you know
10092
Other attributes you can configure are the blur radius and the downscale factor. Getting these to work together well can take some experimentation. The downscale factor is a performance optimization; the bitmap for the background content will be downsized by this factor before being drawn and blurred.
10193

10294
```xml
103-
<com.wonderkiln.blurkit.BlurLayout xmlns:blurkit="http://schemas.android.com/apk/res-auto"
95+
<io.alterac.blurkit.BlurLayout xmlns:blurkit="http://schemas.android.com/apk/res-auto"
10496
android:id="@+id/blurLayout"
10597
android:layout_width="150dp"
10698
android:layout_height="150dp"
@@ -137,18 +129,7 @@ You can also __fastBlur__ a `View`. This optimizes the view blurring process by
137129
BlurKit.getInstance().fastBlur(View src, int radius, float downscaleFactor);
138130
```
139131

140-
## Proguard
141-
If you use Proguard, add the following to your proguard-rules.pro:
142132

143-
```
144-
-keep class com.wonderkiln.blurkit.** { *; }
145-
146-
-dontwarn android.support.v8.renderscript.*
147-
-keepclassmembers class android.support.v8.renderscript.RenderScript {
148-
native *** rsn*(...);
149-
native *** n*(...);
150-
}
151-
```
152133

153134
## Upcoming Features
154135
- [ ] `SurfaceView` support

0 commit comments

Comments
 (0)