FAQ Database Discussion Community


Material Design Ripple Event [duplicate]

android,rippledrawable
This question already has an answer here: How to achieve ripple animation using support library in Android 3 answers For Android , I need to implement animated ripple effect when i touch on any element/view. How do i achieve it ? ...

RippleDrawable - Show Ripple Effect programatically

java,android,android-animation,android-5.0-lollipop,rippledrawable
I have a view with like this <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="New Button" android:id="@+id/button" android:background="@drawable/ripple" android:layout_centerVertical="true" android:layout_alignParentStart="true" /> And ripple.xml as <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight" > <item android:id="@android:id/mask"...

Android- Change colour and have ripples on layout at the same time

android,android-layout,android-selector,rippledrawable
I have a LinearLayout. I have applied ripple effect on it which is working fine. What I'm doing is when user clicks on it, it should change its colour to White (default is Gray). If clicked again, it should become Gray again. This I achieved using layout.setBackgroundColor(Color.WHITE);. But I want...

how to create ripple effect for pre-lollipop

android,rippledrawable
How to apply ripple effect like this i have put the dependencies in app/build.gradle app/build.gradle dependencies { compile 'com.github.traex.rippleeffect:library:1.3' } build.gradle allprojects{ repositories{ jcenter() maven(url "https://jitpack.io" } XML file: <com.andexert.library.RippleView android:id="@+id/rect1" android:layout_width="match_parent" android:layout_height="wrap_content"> <Button android:id="@+id/enterButton" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Save your...

android ripple button with background

android,button,android-5.0-lollipop,rippledrawable
I successfully created a ripple button in android 5.0 using XML. My code is as follows: <?xml version="1.0" encoding="utf-8"?> <!-- the flat button to be used in app --> <!-- define the ripple --> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight"> <!-- the ripple object --> <item android:id="@android:id/mask"> <!-- button shape (w/ radius) -->...

How to make a ripple effect over a linear layout, without overriding the background color on its children?

android,android-layout,rippledrawable
I have a LinearLayout that looks like this. I want each row to be clickable. The LinearLayout code for a row looks like this: <LinearLayout style="@style/home_menu_item_container" android:id="@+id/home_menu_acronyms_button" > <ImageView style="@style/home_menu_item_left" android:background="@color/greyLight" /> <TextView style="@style/home_menu_item_right" android:text="@string/home_menu_option_2" android:background="@color/grey" /> </LinearLayout> How can I add a ripple effect that expands over the entire...

How can I make the ripple effect look like a circle instead of an oval?

android,android-5.0-lollipop,material-design,rippledrawable
I have the same ripple effect on most of my image buttons and on most of them it looks like a circle when pressed but on some buttons it looks like an oval and I'm just not sure why it looks different. I realize the actual ripple shape is set...

Android ripple background color

android,android-activity,android-listview,navigation-drawer,rippledrawable
I am using a ripple effect on my navigation drawer. I have set it like this and applied it to my ListView: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_activated="true" android:drawable="@color/black_200" /> <item android:state_pressed="true" android:color="@color/black_200"> <ripple android:color="@color/black_400" /> </item> <item android:drawable="@color/white" /> </selector> I want the ripple background to remain the same like the...