Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
balysv committed Feb 1, 2015
1 parent 41dbd59 commit 5bcad28
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Ripple effect wrapper for Android Views
Including in your project
-------------------------

Add Sonatype Maven repository and import dependencies

```groovy
compile 'com.balysv:material-ripple:1.0.0'
```

Check for latest version number on the widget below or visit [Releases](https://github.com/balysv/material-ripple/releases)

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.balysv/material-ripple/badge.svg?style=flat)](http://mvnrepository.com/artifact/com.balysv/material-ripple)

Usage
Expand Down Expand Up @@ -47,21 +47,21 @@ Or wrap your `View` with `MaterialRippleLayout` in your layout file:
If using in an `AdapterView` you must set `rippleInAdapter` to `true`


Configure using xml attributes or appropriate setters in code:
Configure using xml attributes or setters in code:

```xml
```java
app:rippleOverlay="true" // if true, ripple is drawn in foreground; false - background
app:rippleColor="#ff0000" // color of ripple
app:rippleAlpha="0.1" // alpha of ripple
app:rippleDimension="10dp" // radius of hover and starting ripple
app:rippleHover="true" // if true, a hover effect is drawn when view is touched
app:rippleRoundedCorners="10dp" // radius of corners of ripples. Note: it uses software rendering pipeline for API 17 and below
app:rippleInAdapter="true" // if true, MaterialRippleLayout will optimize for use in AdapterViews
app:rippleDuration="350" // duration of ripple animation
app:rippleFadeDuration="75" // duration of fade out effect on ripple
app:rippleDelayClick="true" // if true, delays calls to OnClickListeners until ripple effect ends
app:rippleBackground="#FFFFFF" // background under ripple drawable; used with rippleOverlay="false"
app:ripplePersistent="true" // if true, ripple background color persists after animation, until setRadius(0) is called
app:rippleRoundedCorners="10dp" // radius of corners of ripples. Note: it uses software rendering pipeline for API 17 and below
```

Set an `OnClickListener` to `MaterialRippleLayout`:
Expand All @@ -76,12 +76,6 @@ findViewById(R.id.ripple).setOnClickListener(new View.OnClickListener() {

Or if using in an `AdapterView`, simply use `OnItemClickListener`

Access your child `View` if necessary:

```java
MyCustomView view = MaterialRippleLayout.getChildView();
```

Support for Android api versions < 14
-----

Expand Down

0 comments on commit 5bcad28

Please sign in to comment.