react-native
react-native copied to clipboard
Migration RN Alert Dialog to androidx
Summary
Migrates the AlertFragment from android.app.AlertDialog to androidx.appcompat.app.AlertDialog. This backports tons of fixes that have gone into the AlertDialog component over the years, including proper line wrapping of button text, dark mode support, alignment of buttons, etc.
This change provides a fallback to the original android.app.AlertDialog if the current activity is not an AppCompat descendant.
For consideration
- Alert dialog themes may no longer need the
androidnamespace, meaning themes can now be specified asalertDialogThemerather thanandroid:alertDialogTheme.
Changelog:
[Android] [Changed] - Migrated AlertDialog to androidx.appcompat
Differential Revision: D57019423 and D57113950
This pull request was exported from Phabricator. Differential Revision: D57113950
This pull request was exported from Phabricator. Differential Revision: D57113950
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| android | hermes | arm64-v8a | 20,249,243 | -5 |
| android | hermes | armeabi-v7a | n/a | -- |
| android | hermes | x86 | n/a | -- |
| android | hermes | x86_64 | n/a | -- |
| android | jsc | arm64-v8a | 23,454,742 | -8 |
| android | jsc | armeabi-v7a | n/a | -- |
| android | jsc | x86 | n/a | -- |
| android | jsc | x86_64 | n/a | -- |
Base commit: 8a15e0d97ad7556b9f1b4068662791a32e1ae3d2 Branch: main
This pull request was exported from Phabricator. Differential Revision: D57113950
This pull request was exported from Phabricator. Differential Revision: D57113950
This pull request was exported from Phabricator. Differential Revision: D57113950
This pull request was exported from Phabricator. Differential Revision: D57113950
This pull request was exported from Phabricator. Differential Revision: D57113950
This pull request was exported from Phabricator. Differential Revision: D57113950
This pull request was exported from Phabricator. Differential Revision: D57113950
This pull request was exported from Phabricator. Differential Revision: D57113950
This pull request was exported from Phabricator. Differential Revision: D57113950
This pull request was exported from Phabricator. Differential Revision: D57113950
This pull request has been merged in facebook/react-native@297ded90aa1e905a37dba316e7b19b6779c8c804.