Questions tagged [shapedrawable]
99 questions
0
votes
2 answers
Android ShapeDrawable stroke is blurred
I created a rather simple shapedrawable with semi-transparent borders, and used it as a background for two adjacent view.
Either if the srtoke color is partially transparent, I'm expecting a solid stroke (like the image on the right), but what I get…

Ohmnibus
- 415
- 6
- 18
0
votes
1 answer
How to move image on screen?
I want to move an image on the screen and I am able to do that, but not properly. The image goes downward fine and I want it to start going upward in another direction once it has moved to the bottom of the screen.
Here is what I have tried. In the…

nawaab saab
- 1,892
- 2
- 20
- 36
0
votes
1 answer
Android: Round Image inside ring shape
I want to create a button with image inside it as shown at the bottom of this pic https://trianglewiki.org/RGreenway_App/_files/android.jpg/_info/. I am trying using layer-list and shape drawables and able to create buttons very similar. My problem…

user2188951
- 1
- 1
- 3
0
votes
2 answers
transparent Triangle inside a circle how can i override the color of the circle
I have to draw a custom shapeDrawable consisting of a triangle inside a circle. I can draw the circle and the triangle the question is that i want the triangle to be transparent but when i give a transparent color to the path drawing a triangle i…

Driss Bounouar
- 3,182
- 2
- 32
- 49
0
votes
1 answer
ShapeDrawable Subclass Is Haunted By Spooky Ghost Triangle
I am trying to extend/subclass ShapeDrawable. The results are really perplexing. My simple code should create a small dot and also a small triangle. And in fact, these shapes do appear on the mapview, where they are drawn. However, a second triangle…

John Dorsey
- 157
- 1
- 11
0
votes
1 answer
Custom Button (Solid Left Arrow) in android using shape drawable in android
I want make a custom button in android left solid arrow (only arrow shape not its background).
How can I create this arrow button using shape drawable XML in android.
I know how to create rectangle button but not arrow.
Anybody who knows it please…

Ani
- 1,611
- 4
- 14
- 16
0
votes
1 answer
Android: RoundRectShape: Modify corner radii
I have a RoundRectShape that is drawn in a View's onDraw() function.
The corners of this shape are modified by any drag actions on this view through an overridden onTouchEvent function (which calls invalidate() to force the call to onDraw()).
When…

btalb
- 6,937
- 11
- 36
- 44
0
votes
2 answers
Shape lines are always black in a xml drawable
I'm trying to make a drawable which should look like in the image below:
3 horizontal lines of 1dp, each with a different color, and the rest of the space should be filled with a gradient:
So I wrote this:

grunk
- 14,718
- 15
- 67
- 108
-1
votes
1 answer
set color of triangle on run time
i am drawing a triangle with xml as follows:
-

Ichigo Kurosaki
- 3,765
- 8
- 41
- 56