kyleduo/SwitchButton

Have different background colors before and after the thumb drawable

Open

#100 建立於 2017年11月2日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)Java (4,676 star) (866 fork)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.

貢獻者指南