Skip to content
This repository was archived by the owner on Mar 23, 2020. It is now read-only.

fix bug #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ A beautiful ripple animation for your app. You can easily change its color, spee

![Simple Ripple](previews/rippleSimple.gif)      ![Multiple ripples](previews/rippleFoundDevice.gif)

##Usage
## Usage

###Step 1
### Step 1

####Install with Gradle
#### Install with Gradle

```groovy
dependencies {
compile 'com.skyfishjy.ripplebackground:library:1.0.1'
}
```
###Step 2
####RippleBackground

### Step 2

#### RippleBackground

Add `RippleBackground` to your layout with content you want, like an ImageView. Configure the view customization elements using styleable attributes.

Expand Down Expand Up @@ -58,7 +60,8 @@ Stop animation:
rippleBackground.stopRippleAnimation();
```

##Theming
## 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public RippleView(Context context) {
@Override
protected void onDraw(Canvas canvas) {
int radius=(Math.min(getWidth(),getHeight()))/2;
canvas.drawCircle(radius,radius,radius-rippleStrokeWidth,paint);
canvas.drawCircle(getWidth() / 2, getHeight() / 2, radius-rippleStrokeWidth,paint);
}
}

Expand Down