Repository navigation
Commit a352df5
Clear a Switch's stored ripple color when thumbColor is removed
setThumbColor only stored non-null colors, so after thumbColor was removed the
next background color still built its ripple with the old thumb color. Also drop
the mutate() call: each RippleDrawable created from a resource copies its
RippleState, and setColor only writes to that copy, so recoloring it can't
affect other drawables.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 0049973 commit a352df5
2 files changed
Lines changed: 13 additions & 5 deletions
File tree
- packages/react-native/ReactAndroid/src
- main/java/com/facebook/react/views/switchview
- test/java/com/facebook/react/views/switchview
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
113 | 123 | | |
114 | 124 | | |
115 | 125 | | |
| |||
0 commit comments