SwitchCompatLibrary icon indicating copy to clipboard operation
SwitchCompatLibrary copied to clipboard

resize and color change

Open vikky001 opened this issue 10 years ago • 1 comments

how do i resize that switch and also change the color...like when it is off..red color and when it is On ..green color by codeing...or i have to change the drawables in library for that...In On/Off switch any simple suggestion

vikky001 avatar Mar 26 '14 05:03 vikky001

@vikky001 - the solutions the same, either you change the drawables (the nine-patch images) to smaller versions, or create your own drawables, that includes the thumb since that is the one that actually determines the height of the switch. You could have a look at https://github.com/hearbeathorror/Switch-Compat-Changing-Colors an application that uses this library but with different colors and thinned versions of the switch.

ghost avatar Mar 28 '14 07:03 ghost