android-ripple-background-master
所属分类:单片机开发
开发工具:Java
文件大小:6239KB
下载次数:2
上传日期:2016-06-12 15:16:45
上 传 者:
cqdjhx
说明: 水波纹点击效果,github上面的开源项目,代码少好用
(wave effect)
文件列表:
android-ripple-background-master\.idea\.name (32, 2016-06-12)
android-ripple-background-master\.idea\compiler.xml (686, 2016-06-12)
android-ripple-background-master\.idea\copyright\profiles_settings.xml (76, 2016-06-12)
android-ripple-background-master\.idea\encodings.xml (159, 2016-06-12)
android-ripple-background-master\.idea\gradle.xml (316, 2016-06-12)
android-ripple-background-master\.idea\misc.xml (1250, 2016-06-12)
android-ripple-background-master\.idea\workspace.xml (5787, 2016-06-12)
android-ripple-background-master\build.gradle (446, 2015-02-05)
android-ripple-background-master\gradle\wrapper\gradle-wrapper.jar (49896, 2015-02-05)
android-ripple-background-master\gradle\wrapper\gradle-wrapper.properties (230, 2015-02-05)
android-ripple-background-master\gradle.properties (1422, 2015-02-05)
android-ripple-background-master\gradlew (5080, 2015-02-05)
android-ripple-background-master\gradlew.bat (2404, 2015-02-05)
android-ripple-background-master\library\build.gradle (572, 2015-02-05)
android-ripple-background-master\library\gradle.properties (76, 2015-02-05)
android-ripple-background-master\library\proguard-rules.pro (670, 2015-02-05)
android-ripple-background-master\library\src\main\AndroidManifest.xml (139, 2015-02-05)
android-ripple-background-master\library\src\main\java\com\skyfishjy\library\RippleBackground.java (6000, 2015-02-05)
android-ripple-background-master\library\src\main\res\values\attrs.xml (606, 2015-02-05)
android-ripple-background-master\library\src\main\res\values\colors.xml (109, 2015-02-05)
android-ripple-background-master\library\src\main\res\values\dimensions.xml (155, 2015-02-05)
android-ripple-background-master\LICENSE (1072, 2015-02-05)
android-ripple-background-master\local.properties (574, 2016-06-12)
android-ripple-background-master\previews\rippleFoundDevice.gif (4161862, 2015-02-05)
android-ripple-background-master\previews\rippleSimple.gif (2796829, 2015-02-05)
android-ripple-background-master\sample\build.gradle (583, 2015-02-05)
android-ripple-background-master\sample\proguard-rules.pro (670, 2015-02-05)
android-ripple-background-master\sample\src\main\AndroidManifest.xml (805, 2015-02-05)
android-ripple-background-master\sample\src\main\java\com\skyfishjy\ripplebackground\sample\MainActivity.java (2136, 2015-02-05)
android-ripple-background-master\sample\src\main\res\drawable-hdpi\ic_launcher.png (9397, 2015-02-05)
android-ripple-background-master\sample\src\main\res\drawable-xhdpi\ic_launcher.png (14383, 2015-02-05)
android-ripple-background-master\sample\src\main\res\drawable-xxhdpi\ic_launcher.png (19388, 2015-02-05)
android-ripple-background-master\sample\src\main\res\drawable-xxhdpi\phone1.png (10220, 2015-02-05)
android-ripple-background-master\sample\src\main\res\drawable-xxhdpi\phone2.png (10133, 2015-02-05)
android-ripple-background-master\sample\src\main\res\layout\activity_main.xml (1040, 2015-02-05)
android-ripple-background-master\sample\src\main\res\values\strings.xml (126, 2015-02-05)
... ...
# Android Ripple Background
A beautiful ripple animation for your app. You can easily change its color, speed of wave, one ripple or multiple ripples. See demo below.
![Simple Ripple](previews/rippleSimple.gif) ![Multiple ripples](previews/rippleFoundDevice.gif)
##Usage
###Step 1
####Install with Gradle
```groovy
dependencies {
compile 'com.skyfishjy.ripplebackground:library:1.0.1'
}
```
###Step 2
####RippleBackground
Add `RippleBackground` to your layout with content you want, like an ImageView. Configure the view customization elements using styleable attributes.
```xml
```
Start animation:
```java
final RippleBackground rippleBackground=(RippleBackground)findViewById(R.id.content);
ImageView imageView=(ImageView)findViewById(R.id.centerImage);
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
rippleBackground.startRippleAnimation();
}
});
```
Stop animation:
```java
rippleBackground.stopRippleAnimation();
```
##Theming
* app:rb_color [color def:@android:color/holo_blue_dark] --> Color of the ripple
* app:rb_radius [dimension def:***dp ] --> Radius of the ripple
* app:rb_duration [integer def:3000 ] --> Duration of one ripple animation (millisecond)
* app:rb_rippleAmount [integer def:6] --> Max amount of ripples at one screen
* app:rb_scale [interger def:6] --> Scale of ripple at the end of one animation cycle
* app:rb_type [enum (fillRipple, strokeRipple) def:fillRipple] --> Filled circle or ring
* app:rb_strokeWidth [dimension def:2dp] --> Stroke width of the ripple, ONLY work when rb_type="strokeRipple"
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-android--ripple--background-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1107)
近期下载者:
相关文件:
收藏者: