Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skyfishjy/android-ripple-background
A beautiful ripple animation for your app
https://github.com/skyfishjy/android-ripple-background
Last synced: 3 months ago
JSON representation
A beautiful ripple animation for your app
- Host: GitHub
- URL: https://github.com/skyfishjy/android-ripple-background
- Owner: skyfishjy
- License: mit
- Archived: true
- Created: 2014-11-07T03:52:06.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2019-10-11T15:25:48.000Z (about 5 years ago)
- Last Synced: 2024-09-22T03:31:10.957Z (4 months ago)
- Language: Java
- Size: 12.2 MB
- Stars: 2,257
- Watchers: 91
- Forks: 580
- Open Issues: 36
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- -awesome-android-ui - Android Ripple Background - ripple-background.gif" width="49%"> <img src="/art/android-ripple-background2.gif" width="49%"> (Index `(light-weight pages)`)
- awesome-android-ui - Android Ripple Background - ripple-background.gif" width="49%"> <img src="/art/android-ripple-background2.gif" width="49%"> (Index `(light-weight pages)`)
- awesome-android-ui - Android Ripple Background - ripple-background.gif" width="49%"> <img src="/art/android-ripple-background2.gif" width="49%"> (Index)
- awesome-android-ui - https://github.com/skyfishjy/android-ripple-background
- awesome-android-ui - https://github.com/skyfishjy/android-ripple-background
README
# 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
####RippleBackgroundAdd `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:64dp ] --> 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)