When building my app, I started just using the Theme.Light.NoTitleBar.Fullscreen theme. I built all my layouts for the whole app like this, and got things to look how I want them. Some drawables used in the layouts have their size specifically set, and others are set to wrap_content.
I then decided to switch to the Holo light theme. When I do this, all the drawables used in layouts that are set to wrap_content end up larger. Almost as if they are pulling from a larger bucket. In fact, some look like they've been stretched.
I know the background is black in the older theme one, but that's not an issue (this is actually a layout file that is included in another layout). Obviously there's quite a difference in size between the two.
Here is just my guess based on what I read in this thread.
It can be because you use those images as background property of Button
views. This is not safe because depending on default margin values - which are defined in the Theme - Buttons
can stretch background images as they need to. If this is the case, then you need to use ImageButton
views instead and use setImage*()
method to assign images. There you can use scaleType
property as it was mentioned by Carlos Robeles.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With