Ripple Effect Truth

A'nĸιт
A'nĸιт
Jul 21, 2017 · 1 min read

Android ripple effect Truth :
Basically There are 2 type of ripple effect available in android
1. Bounded ripple effect
2. Unbounded ripple effect
Bounded Ripples contained within the view and Unbounded Ripples that extend beyond the view’s bounds.
How to archive :
set background of your view.
Bounded : android:background=”?selectableItemBackground”
UnBounded : android:background=”?selectableItemBackgroundBorderless”

Unfortunately,these ripples are always grey in color.
To tweak these based on your theme, go to your parent theme and change the colorControlHighlight.
In your app’s main theme:
<item name=”colorControlHighlight”>#1bff3a</item>
This value will change the colour of the default ripple.
Note: On devices below 21, the ripple will turn into normal selectors with the same color you have set.

)

A'nĸιт

Written by

A'nĸιт

Wana be immortal in people heart :)

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade