{"id":33196,"date":"2016-03-14T17:53:52","date_gmt":"2016-03-14T12:23:52","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=33196"},"modified":"2016-04-14T12:31:11","modified_gmt":"2016-04-14T07:01:11","slug":"ripple-effect-in-android","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/ripple-effect-in-android\/","title":{"rendered":"Ripple effect in Android"},"content":{"rendered":"<p><strong>What is Ripple?<\/strong><\/p>\n<p><em>Ripple<\/em> is a small wave like pattern, generally formed on the surface of some liquid when you drop something on it.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-33197 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/03\/ripple.gif\" alt=\"ripple\" width=\"219\" height=\"219\" \/><\/p>\n<p><strong>What is Ripple effect in Android?<\/strong><\/p>\n<p><em>Ripple effect<\/em> provides an instantaneous visual confirmation at the point of contact when users interact with UI elements.<\/p>\n<p>These UI elements could be any of the View elements.<br \/>\nLike \u2013 Layouts, Buttons, TextViews, ListViews, etc.<\/p>\n<p>Whenever the user clicks or touches any UI element like, a button, it is desirable to provide some kind of visual confirmation, so that the user knows that their touch or click was successful. Responsive interaction encourages deeper exploration of an app by creating timely, logical, and delightful screen reactions to the user input. However, this interaction should not be distracting to the user. Traditionally in Android, this has been handled using state list drawables to provide different colored or shaded drawables which indicate that a control is in touched or pressed state. With the Android Lollipop, a new touch feedback mechanism was introduced to provide this touch feedback and is loosely based on the concept of ripples on the card metaphor which features strongly in Material design. These ripples are actually really easy to implement.<\/p>\n<p><strong>When was it introduced?<\/strong><\/p>\n<p>In the <a title=\"android app development services\" href=\"http:\/\/www.tothenew.com\/mobile-android-application-development-services\">android development<\/a> ecosystem, it was added in <strong>Android 5.0: API 21(LOLLIPOP)<\/strong>. So, it does not work on pre-lollipop devices. <em>However<\/em>, we have external libraries which can be used to give the same effect. Links for the same are provided at the end of the blog.<\/p>\n<p>Class hierarchy followed is :<\/p>\n<p>[sourcecode language=&#8221;java&#8221;]<br \/>\njava.lang.Object<br \/>\n\u21b3android.graphics.drawable.Drawable<br \/>\n\u21b3android.graphics.drawable.LayerDrawable<br \/>\n\u21b3android.graphics.drawable.RippleDrawable<br \/>\n[\/sourcecode]<\/p>\n<p>&nbsp;<\/p>\n<p><strong>How to achieve Ripple effect?<\/strong><\/p>\n<p>It can be achieved in 2 ways :<\/p>\n<p>(a) Programmatically &#8211; by using <strong>RippleDrawable<\/strong> class.<br \/>\n(b) By XML \u2013 by using <strong>Drawable XML<\/strong> that shows a ripple effect in response to state changes of \u00a0 \u00a0 \u00a0 \u00a0 the View.<\/p>\n<p>In order to understand how the ripple is drawn it would be nice to slow the animation down. The ripple animation runs slower when we perform a long press, so we can use that to see exactly what\u2019s happening.<\/p>\n<p><strong><span style=\"text-decoration: underline;\">Programmatically<\/span><\/strong><\/p>\n<p>Our respective class will implement<strong><em> View.OnTouchListener<\/em> <\/strong>interface.<br \/>\nIt will provide us : <strong><em>public abstract boolean onTouch (View v, MotionEvent event)<\/em> <\/strong>callback.<br \/>\nThis is called, when a touch event is dispatched to a view.<\/p>\n<p>Here, <strong><em>v<\/em><\/strong> : The view, the touch event has been dispatched to.<br \/>\n<strong><em>event<\/em><\/strong> : The MotionEvent object containing full information about the event.<br \/>\nThis method returns <strong>True<\/strong> if the listener has consumed the event, <strong>False<\/strong> otherwise.<\/p>\n<p>The anchoring position of the ripple for a given state is specified by calling <em><strong>setHotspot(float, float)<\/strong> <\/em>with the corresponding state attribute identifier.<\/p>\n<p>[sourcecode language=&#8221;java&#8221;]<br \/>\nprivate RippleDrawable rippleDrawable;<br \/>\nprivate Button buttonWithRipple;<\/p>\n<p>buttonWithRipple = (Button) findViewById(R.id.buttonWithRipple);<br \/>\nrippleDrawable = (RippleDrawable) buttonWithRipple.getBackground();<br \/>\nbuttonWithRipple.setOnTouchListener(this);<\/p>\n<p>@Override<br \/>\npublic boolean onTouch(View v, MotionEvent event) {<br \/>\nswitch (v.getId()) {<br \/>\ncase R.id.buttonWithRipple :<br \/>\nrippleDrawable.setHotspot(event.getX(), event.getY());<br \/>\nrippleDrawable.setColor(ColorStateList.valueOf(getResources().getColor(R.color.red)));<br \/>\nbreak; }<br \/>\nreturn false;<br \/>\n}<br \/>\n[\/sourcecode]<\/p>\n<p>Here,<strong> <em>event.getX() &amp; event.getY()<\/em><\/strong> gives us current pointer coordinates. And then, we set our required color to the rippledrawable object.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-33200 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/03\/11.gif\" alt=\"1\" width=\"236\" height=\"420\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"text-decoration: underline;\">By XML<\/span><\/strong><\/p>\n<p><strong><span style=\"text-decoration: underline;\">Setting DEFAULT Ripple effect on Android 5.0: API 21(LOLLIPOP) devices :<\/span><\/strong><\/p>\n<ul>\n<li>If you want to apply the Standard\u00a0ripple effect on <strong>Android 5.0: API 21 or more<\/strong>, which <strong>should<\/strong> be limited to your view (bounded ripple), just apply to your View background :<\/li>\n<\/ul>\n<p>[sourcecode language=&#8221;java&#8221;] \u00a0 \u00a0 \u00a0 \u00a0<br \/>\n  android:background=&quot;?android:attr\/selectableItemBackground&quot;<br \/>\n[\/sourcecode]<\/p>\n<p>This background attribute value :<\/p>\n<p>[sourcecode language=&#8221;java&#8221;]selectableItemBackground[\/sourcecode]<\/p>\n<p>will provide default ripple effect, which will constrain the animation, within the View that\u2019s handling the touch event.<\/p>\n<ul>\n<li>If you want to apply the standard ripple effect on<strong> Android 5.0: API 21 or more<\/strong>, which <strong>should not<\/strong> be limited to your view (unbounded ripple), just apply to your View background :<\/li>\n<\/ul>\n<p>[sourcecode language=&#8221;java&#8221;]<br \/>\nandroid:background=&quot;?android:attr\/selectableItemBackgroundBorderless&quot;[\/sourcecode]<\/p>\n<p>This background attribute value :<\/p>\n<p>[sourcecode language=&#8221;java&#8221;] selectableItemBackgroundBorderless[\/sourcecode]<\/p>\n<p>will provide default ripple effect, which will extend the animation beyond the bounds of its View that\u2019s handling the touch event. It will be bounded by the nearest parent of the view with a non-null background.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-33227\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/03\/21.gif\" alt=\"2\" width=\"266\" height=\"473\" \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-33228\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/03\/32.gif\" alt=\"3\" width=\"267\" height=\"474\" \/><\/p>\n<p><strong>Standard bounded Ripple Effect \u00a0<\/strong> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <strong>Standard Unbounded Ripple Effect<\/strong><\/p>\n<p><strong><span style=\"text-decoration: underline;\">Setting CUSTOMISED Ripple effect on Android 5.0: API 21(LOLLIPOP) devices :<\/span><\/strong><\/p>\n<p>We create a touch feedback drawable that shows a ripple effect in response to state changes, using the <em><strong>ripple<\/strong><\/em> as root element.<\/p>\n<p>This drawable may contain <em>0 or more child layers<\/em>, including a special mask layer that is not drawn to the screen.<\/p>\n<p>Attributes are as under :<\/p>\n<ul>\n<li><em><strong>android:color<\/strong><\/em> &#8211; the color to use for ripple effects.<\/li>\n<\/ul>\n<p>1. Must be a color value, in the form of<strong> &#8220;#rgb&#8221;, &#8220;#argb&#8221;, &#8220;#rrggbb&#8221;, or &#8220;#aarrggbb&#8221;.<\/strong><br \/>\n2. This may also be a reference to a resource (in the form <strong>&#8220;@[package:]type:name&#8221;<\/strong>) or theme \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 attribute (in the form <strong>&#8220;?[package:][type:]name&#8221;<\/strong>) containing a value of this type. This \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 corresponds to the global attribute resource symbol <em>color<\/em>.<\/p>\n<ul>\n<li><em><strong>android:radius<\/strong><\/em> &#8211; radius of the ripple when fully expanded.<\/li>\n<\/ul>\n<p>1. <strong>Default value is computed based on the size of the ripple&#8217;s container.<\/strong><br \/>\n2. Must be a dimension value, which is a floating point number appended with a unit (like : <strong>px, \u00a0 \u00a0 \u00a0 \u00a0 \u00a0dp, sp, in, mm<\/strong>).<br \/>\n3. This may also be a reference to a resource (in the form <strong>&#8220;@[package:]type:name&#8221;<\/strong>) or theme \u00a0 \u00a0 \u00a0 \u00a0attribute (in the form <strong>&#8220;?[package:] [type:]name&#8221;<\/strong>) containing a value of this type. This \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0corresponds to the global attribute resource symbol <em>radius<\/em>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-33205\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/03\/ripple1.jpg\" alt=\"ripple1\" width=\"638\" height=\"359\" \/><\/p>\n<p><strong><span style=\"text-decoration: underline;\">USAGE :<\/span><\/strong><\/p>\n<p>Set this drawable as the background to your view :<\/p>\n<p>[sourcecode language=&#8221;java&#8221;]android:background=&quot;@drawable\/drawable_name&quot;[\/sourcecode]<\/p>\n<ul>\n<li><strong><strong>Drawable with only a mask layer and no child layer<\/strong><\/strong>\n<pre class=\"western\"><span style=\"color: #000000;\"><span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\"><i>&lt;?<\/i><span style=\"color: #0000ff;\"><b>xml version=<\/b><\/span><span style=\"color: #008000;\"><b>\"1.0\" <\/b><\/span><span style=\"color: #0000ff;\"><b>encoding=<\/b><\/span><span style=\"color: #008000;\"><b>\"utf-8\"<\/b><\/span><i>?&gt;<\/i><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&lt;<span style=\"color: #000080;\"><b>ripple <\/b><\/span><span style=\"color: #0000ff;\"><b>xmlns:<\/b><\/span><span style=\"color: #660e7a;\"><b>android<\/b><\/span><span style=\"color: #0000ff;\"><b>=<\/b><\/span><span style=\"color: #008000;\"><b>\"http:\/\/schemas.android.com\/apk\/res\/android\"<\/b><\/span><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">    <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\"><span style=\"color: #660e7a;\"><b>android<\/b><\/span><span style=\"color: #0000ff;\"><b>:color=<\/b><\/span><span style=\"color: #008000;\"><b>\"@color\/<\/b><\/span><span style=\"color: #008000;\"><b>green<\/b><\/span><span style=\"color: #008000;\"><b>\"<\/b><\/span><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">    <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&gt;<i> <\/i><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">    <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&lt;<span style=\"color: #000080;\"><b>item <\/b><\/span><span style=\"color: #660e7a;\"><b>android<\/b><\/span><span style=\"color: #0000ff;\"><b>:id=<\/b><\/span><span style=\"color: #008000;\"><b>\"@android:id\/mask\"<\/b><\/span><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">        <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\"><span style=\"color: #660e7a;\"><b>android<\/b><\/span><span style=\"color: #0000ff;\"><b>:drawable=<\/b><\/span><span style=\"color: #008000;\"><b>\"@color\/<\/b><\/span><span style=\"color: #008000;\"><b>green<\/b><\/span><span style=\"color: #008000;\"><b>\"<\/b><\/span><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">        <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&gt;<\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">    <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&lt;\/<span style=\"color: #000080;\"><b>item<\/b><\/span>&gt;<\/span><\/span><\/span>\r\n    \r\n<span style=\"color: #000000;\"><span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&lt;\/<span style=\"color: #000080;\"><b>ripple<\/b><\/span>&gt;<\/span><\/span><\/span><\/pre>\n<\/li>\n<\/ul>\n<p><!--?xml version=\"1.0\" encoding=\"utf-8\"?--><\/p>\n<p>If a mask layer is set and the ripple is set as a View background, the ripple effect will be masked against that layer.<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>Drawable with a child layer and a mask layer<\/strong><\/li>\n<\/ul>\n<pre class=\"western\"><span style=\"color: #000000;\"><span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\"><i>&lt;?<\/i><span style=\"color: #0000ff;\"><i><b>xml version=<\/b><\/i><\/span><span style=\"color: #008000;\"><i><b>\"1.0\" <\/b><\/i><\/span><span style=\"color: #0000ff;\"><i><b>encoding=<\/b><\/i><\/span><span style=\"color: #008000;\"><i><b>\"utf-8\"<\/b><\/i><\/span><i>?&gt;<\/i><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&lt;<span style=\"color: #000080;\"><b>ripple <\/b><\/span><span style=\"color: #0000ff;\"><b>xmlns:<\/b><\/span><span style=\"color: #660e7a;\"><b>android<\/b><\/span><span style=\"color: #0000ff;\"><b>=<\/b><\/span><span style=\"color: #008000;\"><b>\"http:\/\/schemas.android.com\/apk\/res\/android\"<\/b><\/span><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">    <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\"><span style=\"color: #660e7a;\"><b>android<\/b><\/span><span style=\"color: #0000ff;\"><b>:color=<\/b><\/span><span style=\"color: #008000;\"><b>\"@color\/green\"<\/b><\/span><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">    <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&gt;<\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">    <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&lt;<span style=\"color: #000080;\"><b>item <\/b><\/span><span style=\"color: #660e7a;\"><b>android<\/b><\/span><span style=\"color: #0000ff;\"><b>:id=<\/b><\/span><span style=\"color: #008000;\"><b>\"@android:id\/mask\"<\/b><\/span><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">        <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\"><span style=\"color: #660e7a;\"><b>android<\/b><\/span><span style=\"color: #0000ff;\"><b>:drawable=<\/b><\/span><span style=\"color: #008000;\"><b>\"@color\/green\"<\/b><\/span><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">        <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&gt;<\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">    <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&lt;\/<span style=\"color: #000080;\"><b>item<\/b><\/span>&gt;<\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">     <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&lt;<span style=\"color: #000080;\"><b>item<\/b><\/span><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">         <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\"><span style=\"color: #660e7a;\"><b>android<\/b><\/span><span style=\"color: #0000ff;\"><b>:drawable=<\/b><\/span><span style=\"color: #008000;\"><b>\"@color\/yellow\"<\/b><\/span>&gt;<\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">     <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&lt;\/<span style=\"color: #000080;\"><b>item<\/b><\/span>&gt;<\/span><\/span><\/span>\r\n  \r\n<span style=\"color: #000000;\"><span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&lt;\/<span style=\"color: #000080;\"><b>ripple<\/b><\/span>&gt;<\/span><\/span><\/span><\/pre>\n<p>If a mask layer is set and the ripple is set as a View background, the ripple effect will be masked against that layer before it is drawn over the composite of the remaining child layers (if they exist).<br \/>\nHere, background color of button is changed by setting the child layer in the Ripple drawable XML.<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>Drawable with no mask layer or child layer<\/strong><br \/>\n<!--?xml version=\"1.0\" encoding=\"utf-8\"?--><\/li>\n<\/ul>\n<pre class=\"western\"><span style=\"color: #000000;\"><span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\"><i>&lt;?<\/i><span style=\"color: #0000ff;\"><b>xml version=<\/b><\/span><span style=\"color: #008000;\"><b>\"1.0\" <\/b><\/span><span style=\"color: #0000ff;\"><b>encoding=<\/b><\/span><span style=\"color: #008000;\"><b>\"utf-8\"<\/b><\/span><i>?&gt;<\/i><\/span><\/span><\/span><\/pre>\n<pre class=\"western\"><span style=\"color: #000000;\"><span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&lt;<span style=\"color: #000080;\"><b>ripple <\/b><\/span><span style=\"color: #0000ff;\"><b>xmlns:<\/b><\/span><span style=\"color: #660e7a;\"><b>android<\/b><\/span><span style=\"color: #0000ff;\"><b>=<\/b><\/span><span style=\"color: #008000;\"><b>\"http:\/\/schemas.android.com\/apk\/res\/android\"<\/b><\/span><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">    <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\"><span style=\"color: #660e7a;\"><b>android<\/b><\/span><span style=\"color: #0000ff;\"><b>:color=<\/b><\/span><span style=\"color: #008000;\"><b>\"@color\/green\"<\/b><\/span><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\">    <span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&gt;<i> <\/i><\/span><\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"font-family: 'Bitstream Charter', serif;\"><span style=\"font-size: large;\">&lt;\/<span style=\"color: #000080;\"><b>ripple<\/b><\/span>&gt;<\/span><\/span><\/span><\/pre>\n<p>If no child or mask layer is specified and the ripple is set as a View background, the ripple will be drawn atop the first available parent background within the View&#8217;s hierarchy.<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-33230\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/03\/41.gif\" alt=\"4\" width=\"201\" height=\"358\" \/>\u00a0\u00a0\u00a0<img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-33231\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/03\/53.gif\" alt=\"5\" width=\"200\" height=\"356\" \/>\u00a0 \u00a0<img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-33232\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/03\/croped_gif1.gif\" alt=\"croped_gif\" width=\"200\" height=\"355\" \/><\/p>\n<p><strong><strong>Drawable with only a mask \u00a0 \u00a0 \u00a0 Drawable with a mask\u00a0\u00a0 \u00a0\u00a0Drawable with no mask or<\/strong><\/strong><\/p>\n<p><strong><strong>layer and no child layer \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 layer and a child layer \u00a0 \u00a0 \u00a0child layer<\/strong><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Below are the references to various libraries which can be used to apply Ripple Effect on Pre-Lollipop devices :<\/p>\n<ul>\n<li>https:\/\/github.com\/siriscac\/RippleView.git<\/li>\n<li>https:\/\/github.com\/balysv\/material-ripple.git<\/li>\n<li>https:\/\/github.com\/traex\/RippleEffect.git<\/li>\n<li>https:\/\/android-arsenal.com\/tag\/167<\/li>\n<\/ul>\n<p>Thanks to <strong>Google<\/strong> for its Material Design \u00a0\u00a0<strong>\ud83d\ude42<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Ripple? Ripple is a small wave like pattern, generally formed on the surface of some liquid when you drop something on it. What is Ripple effect in Android? Ripple effect provides an instantaneous visual confirmation at the point of contact when users interact with UI elements. These UI elements could be any of [&hellip;]<\/p>\n","protected":false},"author":316,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"image","meta":{"iawp_total_views":145},"categories":[518,1772,1],"tags":[3204,3205],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/33196"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/316"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=33196"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/33196\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=33196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=33196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=33196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}