-1

I have zero knowledge of custom shape designing in drawable.
I need to design custom shape button where the text on the button will be displayed from server.
Can anybody please help me in designing this shape?
Also, the shape should be auto adjustable like the button is used to function in wrap_content.

I need a shape like this:

enter image description here

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Ravi Bhardwaj
  • 128
  • 1
  • 15

1 Answers1

0

What you're looking for is the Shape Drawable. Basically, in Android the easiest way to create custom shapes is by creating a Shape drawable and defining its shape in the drawable's XML.

Drawables are better than other image forms such as .PNG - specially for your use case. If you're new to custom shapes and drawables, I'd recommend you to read up more on them and their advantages.

Also, take a look at this question for a working example.

You'd find a number of similar examples all over SO and other websites. You might just also find a shape drawable that matches the exact pattern that you're looking for.

Rohan Stark
  • 2,346
  • 9
  • 16