kyleduo / kyleduo/SwitchButton
Change Color in Off state
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Java
- Stars
- 4.7k
- Forks
- 864
- PR merge metrics
- No merged PRs in 30d
Description
There is a way to change color in off state?
<com.kyleduo.switchbutton.SwitchButton
android:id="@+id/sb_tint_color_3"
style="@style/SwitchButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:kswTintColor="@color/selector_color" />
select_color file is a simple color selector
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#ffcc0000" android:state_checked="true"/>
<item android:color="#ff669900" android:state_checked="false" />
</selector>
But I continue to see only On-state color (red in this example) and I don't see off-color (green in this example).
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
Start by reproducing the issue with the SwitchButton XML and selector shown, then trace how the kswTintColor attribute handles checked and unchecked states. Done means the widget displays the red color when checked and the green color when unchecked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100