Hello, wonderful friends today in this blog on learning in android XML files creating different types of shape creating. A shape is an XML file that defines a geometric shape, including strokes, colors, and gradients
First Creating .xml file:
- Open android studio
- Go to drawable
- Go to drawable
Follow below image steps:
Now friend starts coding:
- Creating a capsule shape flow below code:
Corners:
The below image is showing the shape corner radius
Solid:
Solid means shape inner color “#CFCFCF”
Padding:
There is always developer confusion between padding and margin. Both provide extra space/gap inside or outside the container. In simple words, margin means to push outside, whereas padding means to push inside.
Size:
It’s very simple shape width – height