Questions tagged [android-shape]

This is a generic shape defined in XML.

This is a generic shape defined in XML.

Reference: http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape

191 questions
0
votes
1 answer

how to draw android textview shape with rightbottom gradient

I am trying to draw textview rectangle shape with bottom shadow and rightbottom corner gradient.which look like page folded at right bottom corner I have tried this,but this giving me right part of shape displaying black, i want only rightbottom…
sandy
  • 97
  • 2
  • 14
-1
votes
1 answer

Draw a shape ( drawable ) using xml on android studio

I would like to draw the following shape ( without border ) using xml on android studio. Could anyone please help me to draw it ?
-1
votes
2 answers

Android - Is this mandatory to create each shape in separate xml file?

Let say i want these shapes in my project, like rectangle, ring and oval: Which means i should have three xml files for each shape. So, as far as i know we create separate xml file for each shape. Is this mandatory to create each shape in separate…
-1
votes
1 answer

creating a custom drawable shape

I want to create the shape rectangle as shown below the Image. what am I supposed to do? with best regards.
fardad
  • 57
  • 2
  • 11
-1
votes
1 answer

Shape padding not working pre 6 Android

Seems like shape padding doesn't work on pre 6 Android. I'm trying to add padding to custom ProgressBar background gradient and that what I have: Android 6.0: Android 5.0 and below: pb_shape.xml:
AnZ
  • 1,040
  • 24
  • 54
-1
votes
1 answer

How to make this shape in Android

I want create shape such as this image : But i do not want use 9 pach png image, i want create this shape in drawable folder. How can i create this? Any help could be appreciated! Thanks
F_Feed
  • 125
  • 1
  • 1
  • 8
-1
votes
1 answer

How do I create a drawable that expand only vertically / horizontally with XML in Android

I want to know if there is a way to obtain the effect of an image expanding with solid color only from one side. Suppose you start with a bitmap like this: and you want to setup an XML drawable so that it expand and shrink horizontally keeping its…
-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
-2
votes
1 answer

Rotate and resize rectangle drawn in canvas in Android

In my Android application I have drawn rectangle in canvas, how can I rotate rectangle and resize the rectangle on touch events ? canvas.drawRect(300,300,500,500,paint); This code is used to draw the rectangle.
-2
votes
3 answers
-5
votes
1 answer

How to draw oval with some pointer edge

I want to draw something oval with some pointer to something . How can I achieve it via shapes in Android?
LearningBasics
  • 660
  • 1
  • 7
  • 24
1 2 3
12
13