xml - Button with background and scale on click - Android -
i've particular button make. need define button in xml, it's composed 2 part: icon or text , monocolor background setted alpha(only on background). icon should in middle(with adjustments) of background. when press button should scale(icon background together) , original size on relase.
i've looked solution , found selector, replace image one. there way without replace image?
i think best solution go selector. in 1 selector create button original size , in second selector create button smaller size, or whatever size need.
now achieving effect icon , background together, can set button icon android:drawable="@drawable/icon.png"
, setting background android:background="@drawable/background.png"
.
Comments
Post a Comment