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
0
votes
0 answers

How to change the solid color of a ripple effect

I have a toggle button with 3 custom states : - Pressed - Checked - Realeased I'm using the following xml:
0
votes
1 answer

How can i control the ripple fade in and out duration?

I write an android code that has ripple effect by adding: android:background="?attr/selectableItemBackground" I need to tweak it. I know how to change the ripple color. But do you think the following are even possible to tune? On tap (click and…
Elad Benda
  • 35,076
  • 87
  • 265
  • 471
0
votes
1 answer

How to give users hint about various buttons and other actions like google keep with ripple effect, without using any third party library

Want to make it like this, so that user will know what are the actions these buttons going to perform
0
votes
1 answer

How to create ripple with corner radius programmatically?

There are some similar questions. But they are not resolved! Set RippleDrawable corner radius programmatically I know that this behaviour can be done using xml file. But I must it programmatically. My code is below: GradientDrawable gd = new…
us2956
  • 476
  • 12
  • 27
0
votes
1 answer

Correctly setting the background of a list item

I use a RecyclerView and a simple item layout consisting of a ConstraintLayout holding the text elements of each item. I want to set the background of all items while showing a ripple effect when clicked. visualizing when the view is active. being…
Felix D.
  • 786
  • 1
  • 11
  • 17
0
votes
0 answers

Button press effect like ios

I'm trying to add press effect to my button I have a button with android:drawableStart="@drawable/my_image" and I've added android:background="?attr/selectableItemBackgroundBorderless" …
tpbafk
  • 501
  • 5
  • 26
0
votes
1 answer

Android change color of shape Instance

I have three buttons with same ripple shape. when I enter activity I change color of single buttons shape. RippleDrawable bg = (RippleDrawable) button.getBackground(); GradientDrawable gradient = (GradientDrawable)…
0
votes
1 answer

Adding ripple effect to stacked views in Android Studio

I am trying to implement ripple effect to the "Vegetarian" and "Non Vegetarian" button but it is being blocked by the TextView used for button labels in both cases. Below is my XML file activity_main.xml
iammrmehul
  • 730
  • 1
  • 14
  • 35
0
votes
0 answers

Ripple Drawable error even if i'm not using it anywhere

I've not used any RippleDrawable instance or library in my code directly still whenever i compile my app it crashes and android monitor console states that Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method…
F.Shahid
  • 11
  • 3
0
votes
1 answer

Ripple Effect Disabled for List View Item

I am using the following background for the list view item:
Abdalrahman Shatou
  • 4,550
  • 6
  • 50
  • 79
0
votes
0 answers

Android ripple cannot get desired color

The ripple xml is Name of the file is rounded_button_leave_submit.xml(v-21) The button…
debo.stackoverflow
  • 911
  • 1
  • 10
  • 30
0
votes
1 answer

Adding ripple effect on android project

Is there any library or dependency to add ripple effect in existing project,I don't want define ripple effect on each views, just want to add effect on one place for whole project.
0
votes
2 answers

Combine selectableItemBackground with shape for final background

I have a simple RecyclerView in which each row displays a line of text. Each row is selectable and so I want to use android:background="?attr/selectableItemBackground" The problem is that RecyclerViews do not allow for dividers; whereas I want…
Katedral Pillon
  • 14,534
  • 25
  • 99
  • 199
0
votes
1 answer

RippleDrawable as a background of View inside LinearLayout gets clipped by LinearLayout bounds - can this behavior be disabled?

So, I've a layout hierarchy like this: LinearLayout |-TextView TextView has unbound RippleDrawable(i.e. with no mask) set as a background, however, it gets clipped by LinearLayout that contains this TextView. Are there any methods to alter this…
0
votes
3 answers

Navigate Between Activities (Android Studio)

I got a problem when I navigate between two activities, it shows me error and I don't know what is the problem. I am very sure that my code is correct, because it just simple Intent navigate by on click Button. When I Press the button to go to the…