https://github.com/m1ga/ti.blurview
Android BlurView module for Appcelerator Titanium
https://github.com/m1ga/ti.blurview
android appcelerator blur titanium-mobile titanium-module
Last synced: about 1 month ago
JSON representation
Android BlurView module for Appcelerator Titanium
- Host: GitHub
- URL: https://github.com/m1ga/ti.blurview
- Owner: m1ga
- License: other
- Created: 2020-12-29T20:23:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-16T10:01:01.000Z (about 2 years ago)
- Last Synced: 2025-03-29T01:13:13.089Z (about 2 months ago)
- Topics: android, appcelerator, blur, titanium-mobile, titanium-module
- Language: Java
- Homepage:
- Size: 1.15 MB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ti.Blurview
## Android BlurView module for Appcelerator Titanium
Simple Android BlurView module for Appcelerator Titanium. Based on: https://github.com/mmin18/RealtimeBlurView
### Usage
add
```
repositories {
maven { url 'https://jcenter.bintray.com/' }
}
```
to your `build.gradle`. If you don't have one you can create it in `app/platform/android/build.gradle````xml
ti.blurview
```
```xml
```
or
```javascript
var blur = require("ti.blurview");
var blurView = blur.createBlurView({});
```### API
Properties:
* blurRadius (int)
* backgroundColor (color)### Example:
```javascript
var win = Ti.UI.createWindow({
backgroundColor: "#fff"
});
var img = Ti.UI.createImageView({
image: "https://raw.githubusercontent.com/CameraKit/blurkit-android/master/demo/src/main/res/drawable-nodpi/peppers.png",
width: 640,
height: 400,
top: 0
})
var contentView = Ti.UI.createView({
height: 100,
top: 100
})
var lbl = Ti.UI.createLabel({
text: "Content",
color: "#000"
})
var blurview = require("ti.blurview").createBlurView({
blurRadius: 20,
backgroundColor: "#55ffffff"
});
var view_menu = Ti.UI.createView({
bottom: 0,
height: Ti.UI.SIZE,
width: Ti.UI.FILL,
layout: "vertical",
backgroundColor: "#efefef"
})
contentView.add(blurview)
contentView.add(lbl)
win.add([img, contentView, view_menu]);var lbl1 = Ti.UI.createLabel({
text: "Blur: 2",
color: "#000",
left: 10,
top: 10
});
var slider1 = Ti.UI.createSlider({
min: 1,
max: 20,
left: 20,
right: 20,
value: 20,
bottom: 10
})
view_menu.add([lbl1, slider1]);slider1.addEventListener("change", function(e) {
blurview.blurRadius = Math.round(e.value);
lbl1.text = "Blur: " + Math.round(e.value);
});var btn1 = Ti.UI.createButton({
title: "move"
})view_menu.add(btn1);
btn1.addEventListener("click", function(e) {
contentView.animate({
top: 400,
duration: 4000,
autoreverse: true
})
});win.open();
```