kyleduo / kyleduo/SwitchButton
Have different background colors before and after the thumb drawable
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.7k
- Forks
- 864
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Start by locating the Android switch widget's drawing and thumb/background handling, then determine how the track is rendered on each side of the thumb. Done means the switch can display distinct colors before and after the thumb, including when the thumb is centered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100