Commit 32c3a19
authored
fix(Android): missing background color for formSheets on RN 0.77+ (#2660)
## Description
* facebook/react-native#45688 introduced
`BackgroundStyleApplicator`
* facebook/react-native#47906 removed our
current accessor
* somewhere along the way the `ColorDrawable` used previously by
`ReactViewGroup` has been exchanged for `CompositeBackgroundDrawable`
added in facebook/react-native#45688
> [!caution]
~This PR breaks compatibility with older versions of react-native. While
this is fine on Fabric, this also breaks things for Paper.~
> ~Possible solution is to detect react native version in gradle and add
versioned sourcesets with implementations for given react native
versions.~
>
> Not up to date. I've added versioned source files to ensure
appropriate backward compatibility down to 0.74.
> [!note]
> We need CI to ensure the projects do build on all versions we support.
## Changes
Migrated to `BackgroundStyleApplicator API` to resolve background color
of `contentWrapper`.
## Test code and steps to reproduce
`TestAndroidTransitions` - the form sheet should no longer be cut.
## Checklist
- [ ] Ensured that CI passes1 parent 89f8ad3 commit 32c3a19
5 files changed
Lines changed: 64 additions & 6 deletions
File tree
- android
- src
- main/java/com/swmansion/rnscreens
- versioned/backgroundcolor
- 74
- 76
- latest
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
| |||
166 | 174 | | |
167 | 175 | | |
168 | 176 | | |
| 177 | + | |
169 | 178 | | |
170 | 179 | | |
171 | 180 | | |
| |||
175 | 184 | | |
176 | 185 | | |
177 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
178 | 196 | | |
179 | 197 | | |
180 | 198 | | |
| |||
188 | 206 | | |
189 | 207 | | |
190 | 208 | | |
191 | | - | |
| 209 | + | |
192 | 210 | | |
193 | 211 | | |
194 | 212 | | |
| |||
Lines changed: 21 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
577 | 595 | | |
578 | 596 | | |
579 | 597 | | |
| |||
584 | 602 | | |
585 | 603 | | |
586 | 604 | | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
| 605 | + | |
| 606 | + | |
591 | 607 | | |
592 | 608 | | |
593 | 609 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments