Is it possible to set water ripple effect in bitmap onTouchEvent
method?
@Override
public void onTouchEvent(MotionEvent event) {
}
If yes then How?
thanks
In case you have an ImageView and after user clicks this ImageView you want to display the ripple effect you don't need to use the onTouchEvent method. If that's the case answer to this can be found in this StackOverflow question. I'll summarize the answer below.
Wrap your ImageView in FrameLayout and set your ripple drawable to the FrameLayout's android:forgeround attribute in XML. You can find code sample and also workaround for Android SDK versions lower than 21 in the linked answer.