kyleduo/SwitchButton

Have different background colors before and after the thumb drawable

Open

#100 opened on 2017年11月2日

GitHub で見る
 (4 comments) (0 reactions) (0 assignees)Java (4,676 stars) (866 forks)batch import
help wanted

説明

Hi,

Thanks a lot for sharing the library, it is working great.

What I would like to do is to have two different background colors, one for the part of the switch button before the thumb drawable and one for the part after the thumb drawable.

So far, I just managed to change the background color of the whole button depending on wether it is selected or not. But what I want is, for instance, if the thumb drawable is at the middle of the button, the left side of it to be red and the right side to be blue.

Thanks in advance.

コントリビューターガイド