Created
September 14, 2015 23:51
-
-
Save ar-android/c7de6a9a0a9327e3a931 to your computer and use it in GitHub Desktop.
Create simple ripple effect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
compile 'com.github.traex.rippleeffect:library:1.3' | |
} | |
<com.andexert.library.RippleView | |
android:id="@+id/rect" | |
rv_centered="true" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"/> | |
h.rippleView = (RippleView) view.findViewById(R.id.rect); | |
public void setRipple(){ | |
h.rippleView.setOnClickListener(new View.OnClickListener() | |
{ | |
@Override | |
public void onClick(View v) | |
{ | |
Log.e("Sample", "Click Rect !"); | |
} | |
}); | |
h.rippleView.setOnRippleCompleteListener(new RippleView.OnRippleCompleteListener() { | |
@Override | |
public void onComplete(RippleView rippleView) { | |
Log.d("Sample", "Ripple completed"); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment