I'm trying to draw a circle which will have the same diameter of 2.5 inches (or any other value) in every android device, regardless of the screen size. The diameter size must be same in all the devices and below is what I have…
I'm trying to use for displaying pressed state of the button. To do that, I use stroke with transparent color in normal state and colored one in pressed state:
button.xml :
In Lollipop we set a view's Shadow by setElevation() method.
But in pre-Lollipop, it doesn't work.
What is the best approach so that the View will have identical look when displayed on pre-lollipop devices and lollipop devices?
I have to set background of this to many views with different colors. but if I make it so, the xml will be around 20 files, which is huge, so I want to convert the following xml layer-list into progmatical way into fully independent module without…
I have a Button that uses a shape as it's background.
The shape will have different color based on the state of the Button
Is it possible for me to specify the color of each state inside the Button's xml? I am sorry for the newbie question.
Any…
I'm using XML drawables and overlaying them ontop of eachother dynamically using layers. Everytime the user hits a button it overlays another image. The issue is that once I have five or ten layers of this particular XML drawable then the UI wants…
I wanna create a view with Arc Shape background.. my view has weight of .3.. which makes it fill one third of my layout..
I try to set its background to an arc shape (I want it to be half oval) like this:
ArcShape shape = new ArcShape(270,…
am trying to draw sloped rectangle upper edge shape and use it as linear layout background as in the picture:
here is the link to the design am trying to achieve: http://postimg.org/image/krjwfcisz/
I tried to draw a rectangular and rotate it but…