Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wl9739/BlurredView
【Deprecated】 Dynamic blur of image views for Android
https://github.com/wl9739/BlurredView
Last synced: 3 months ago
JSON representation
【Deprecated】 Dynamic blur of image views for Android
- Host: GitHub
- URL: https://github.com/wl9739/BlurredView
- Owner: wl9739
- License: apache-2.0
- Archived: true
- Created: 2016-07-18T08:34:23.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-25T10:33:27.000Z (about 8 years ago)
- Last Synced: 2024-06-16T03:32:05.031Z (5 months ago)
- Language: Java
- Homepage:
- Size: 6.43 MB
- Stars: 1,008
- Watchers: 26
- Forks: 161
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-github-android-ui - BlurredView - Android图片视图动态模糊 (模糊效果)
README
# BlurredView
Dynamic blur of Image Views for Android. This library is based on **RenderScript**. You can find more detail about RenderScript here: [RenderScript][1]
Includes library and small example project.
![demo][2]
## Gradle
```Groovy
compile 'com.qiushui:blurredview:0.8.1'
```## Enable RenderScript support mode:
```Groovy
defaultConfig {
renderscriptTargetApi 19
renderscriptSupportModeEnabled true
}
```## How to use
```XML
```
* You can use `app:src="@drawable/XXX"` in layout to set the image to be blurred.Or you may use `mBlurredView.setBlurredImg();` in your java code to specify the image to be blurred.
* You can use `mBlurredView.setBlurredLevel(int alpha)`to determine the level of blur. The value of alpha is between 0 and 100.
* You can use `mBlurredView.setBlurredTop(int topDistance)`to make blurred image move when `app:move="true"` is special. The value of topDistance is between 0 to 100.If you want to know more about this library, see [my blog][3].
## Notice
* Make sure your *build tools* version is above 23.0.3 .
* This library is only work for **.png** image.
* Usually, you need add the following code in **defaultConfig** :```java
ndk {
abiFilters "armeabi","armeabi-v7a", "x86", "mips"
}
```License
-------
Copyright 2016 Qiushui
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.[1]: https://developer.android.com/guide/topics/renderscript/compute.html
[2]: https://github.com/wl9739/BlurredView/blob/master/Gif/demo.gif
[3]: http://wl9739.github.io/2016/07/14/%E6%95%99%E4%BD%A0%E4%B8%80%E5%88%86%E9%92%9F%E5%AE%9E%E7%8E%B0%E6%A8%A1%E7%B3%8A%E6%95%88%E6%9E%9C/