Skip to content Skip to sidebar Skip to footer

Background Size Getting Changed

I'm changing Background color of a button programmatically as below Button button =(Button)findViewById(R.id.one); button.setBackgroundColor(0xFFFF0000); But after this t

Solution 1:

Default button background drawable has some kind of margins. These margins are just transparent pixels on the sides of the image. When you set background color for a button these margins disappear because the whole rectangle of the button is filled with the color.


Post a Comment for "Background Size Getting Changed"