Questions tagged [rippledrawable]

Using RippleDrawable, users will no longer have a button (for example) that simply changes colors when pressed; instead, that button will respond with ripples and waves when users interact with it.

Using RippleDrawable, users will no longer have a button (for example) that simply changes colors when pressed; instead, that button will respond with ripples and waves when users interact with it.

The design principle is shown at https://material.io/design/motion/.

184 questions
166
votes
13 answers

Add ripple effect to my button with button background color?

I created a button and I want to add ripple effect to that button! I created a button bg XML file: (bg_btn.xml)
rakcode
  • 2,256
  • 4
  • 19
  • 44
160
votes
13 answers

How to make a circular ripple on a button when it's being clicked?

Background On the dialer app of Android, when you start searching for something, and you click the arrow button on the left of the EditText, you get a circular ripple effect on it : The problem I've tried to have it too, but I got a rectangular…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
151
votes
11 answers

How to create ripple effect in simple layout

How can I have a ripple effect in a simple linear/relative layout when touching the layout? I've tried setting the background of a layout to something like:
Zach
  • 3,909
  • 6
  • 25
  • 50
67
votes
10 answers

Touch feedback with RecyclerView and CardView

I would love to enable touch feedback for my Open-Source library. I've created a RecyclerView and a CardView. The CardView contains different areas with different onClick actions. Now I would love to trigger the Ripple effect if a user clicks…
66
votes
4 answers

How to set state_selected in ripple drawable

How to specify android:state_selected inside a RippleDrawable I have following xml for ripple drawable but background color doesn't show up when I set myView.setSelected(true);
Sohaib
  • 10,941
  • 9
  • 32
  • 34
55
votes
6 answers

Listview selector with colored background and ripple effect

Standard ListView selector in android L developer preview uses colorControlHighlight for the ripple effect on touch and has a transparent background in unfocused state. I would like to define a ListView item that has a colored background and still…
50
votes
7 answers

Android L's Ripple Effect - Touch Feedback for Buttons - Using XML

I am trying to understand how to implement the "Ripple Effect - Touch Feedback" for buttons and other views. I looked at the questions related to Ripple touch effect on SO and got some insight into it. I was able to successfully get the ripple…
Vamsi Challa
  • 11,038
  • 31
  • 99
  • 149
45
votes
5 answers

Android ripple background color

I am using a ripple effect on my navigation drawer. I have set it like this and applied it to my ListView:
40
votes
4 answers

Ripples on a shape with a transparent background

I am using the following shape in my app
Sudara
  • 4,769
  • 3
  • 34
  • 39
38
votes
4 answers

AppCompatButton backgroundTint API < 21

I want to use ripple effects on Buttons. AppCompat v22.1 added AppCompatButton and new functionalities to AppCompat tinting. My Layout:
38
votes
1 answer

Lollipop RippleDrawable vs Selector for Pre-Lollipop

I have buttons with different draw9patch png as background. Currently the buttons are controlled by selector which look something like this:
Neoh
  • 15,906
  • 14
  • 66
  • 78
35
votes
4 answers
31
votes
3 answers

Implementing Ripple effect outside ImageButton

I am trying to implement ripple effect for ImageButton.I have set ripple in background and drawable image in the src for it. android:background="@drawable/myripplexml" android:src="@drawable/myimagepath" Its giving nice ripple effect inside button…
28
votes
6 answers

How to trigger ripple effect on Android Lollipop, in specific location within the view, without triggering touches events?

This is a short question: Suppose I have a View with the RippleDrawable as background. Is there an easy way to trigger the ripple from a specific position without triggering any touch or click events?
android developer
  • 114,585
  • 152
  • 739
  • 1,270
25
votes
5 answers

How to handle the Ripple effect on 9-patch and CardView, and have control over the states of the selector?

Background I wish to add a simple ripple effect for listView items from Android Lollipop and above. First I'd like to set it for simple rows, and then to 9-patch rows and even CardView. The problem I was sure this one is going to be very easy, as it…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
1
2 3
12 13