Questions tagged [android-gradient-drawable]
7 questions
1
vote
1 answer
Clip For GradientDrawable.setCornerRadii not working
I'm trying to create a view with custom radius but facing a problem when using GradientDrawable.setCornerRadii...Line If i use Below code the view clips all the child view inside it
public void SetCornerRadius(View v,int Radius){
…

nikzdevz
- 13
- 3
0
votes
0 answers
GradientDrawable extend beyond boundaries
What to do if child layouts extend beyond root boundaries?
My code:
LinearLayour root = new LinearLayout(context);
LinearLayour head = new LinearLayout(context);
GradientDrawable gd = new…

Eonux
- 1
0
votes
0 answers
Drawable color scatters after setting in programmatically (Android studio JAVA)
So After I set the color for my LinearLayout Background drawable programmatically for a certain view, the other views change to that color, even when the original view in the xml is not that color.
This is the code I used to set the background of my…

onwuegbuchi eric
- 11
- 1
0
votes
0 answers
how to change GradientDrawable color on android 13
I want to change the color of the GradientDrawable. Here is how I do it. This works on android 12 and earlier but can't apply on android 13.
I have selected_dot.xml:

Anh Khoa
- 1
0
votes
1 answer
Is there any way to make a stroke gradient with blurish effect in Android?
The design I received from the designer is something like this, but I'm not able to build this just using layer-list.
Is there any way to achieve this UI? It will really helpful for me as well as other fellow developers!
Thanks :)

Prateek
- 502
- 5
- 16
0
votes
1 answer
How to animate gradient colors in Android like Facebook Shimmer effect
I am trying to add a loading placeholder (just a linear layout) until I get a response from the API. I want to add a Shimmer like effect to the placeholder without using an external library.
I tried using a GradientDrawable with a ValueAnimator from…

Davi
- 1,031
- 12
- 21
0
votes
1 answer
Android Indeterminate ProgressBar : Animating custom drawable
I currently have an Indeterminate ProgressBar

Sruthi
- 2,908
- 1
- 11
- 25