allprojects {
repositories {
maven { url 'https://jitpack.io' } //add this
jcenter()
}
}
Add this line to your Module build.gradle
dependencies {
compile 'com.github.YSaeid:RippleView:1.0.1'
}
Add The RippleRelativeLayout to your layout xml file
<yazdany.saeid.view.rippleview.RippleRelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
</yazdany.saeid.view.rippleview.RippleRelativeLayout>
use this attribute
app:autoStart="true"
app:rippleColor="6"
app:ripplaCount="6"
app:rippleAnimateDuration="3000"
app:rippleDelay="500"
app:rippleRadius="200dp"
app:rippleScale="4"
app:rippleType="fill"
app:rippleStokeWidth="4dp"
<yazdany.saeid.view.rippleview.RippleRelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:autoStart="true"
app:rippleColor="6"
app:ripplaCount="6"
app:rippleAnimateDuration="3000"
app:rippleDelay="500"
app:rippleRadius="200dp"
app:rippleScale="4"
app:rippleType="fill"
app:rippleStokeWidth="4dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
</yazdany.saeid.view.rippleview.RippleRelativeLayout>
use method if you want
ripple.playRipple();
ripple.stopRipple();