Android StatelistDrawable causes button to shrink -
i've got problem statelistdrawable button background. first of - must create button background @ runtime, because receive color values (gradients, border...) via webservice. add together state "disabled" button (i want disabled buttons appear grey...), buttons shrink!!
i've created custom class derives statelistdrawable (sourcecode of custom statelistdrawable).
here results... http://i50.tinypic.com/2m4ai2s.jpg
i don't know how accomplish this, need statelistdrawable generated @ runtime , supports gradients , rounded rectangles. can help me?
regards martin
-------------edit---------------
i've forgotten mention issue does't impact devices/android versions. there's fine on lg optimus 2x (with official ics) example. on htc sensation cm10.1, buttons shrink after setting background statelistdrawable.
for now, have stupid workaround (setting padding after applying background drawable)...
android button gradient statelistdrawable
No comments:
Post a Comment