[TIMOB-28083] Android: Update dialogs to support material theme
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-03-05T15:57:29.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 10.0.0 |
Components | Android |
Labels | 2020-Q4, OptionDialog, alert, android, breaking-change, dialog, material-theme |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2020-08-13T23:47:45.000+0000 |
Updated | 2021-03-05T15:57:29.000+0000 |
Description
*Summary:*
We should replace our usage of "AlertDialog.Builder" to "MaterialAlertDialogBuilder" so that our Android dialogs can support "Theme.MaterialComponents" based themes.
https://material.io/develop/android/components/dialogs
This effects the following Titanium APIs:
* [alert()](https://docs.appcelerator.com/platform/latest/#!/api/Global-method-alert)
* [Ti.UI.AlertDialog](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.AlertDialog)
* [Ti.UI.OptionDialog](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.OptionDialog)
* [Ti.UI.Android.ProgressIndicator](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Android.ProgressIndicator) using the dialog style
*Breaking-Change:*
The app must use a "Theme.MaterialComponents" based theme or else an exception will occur. So, app's using a custom theme based from "Theme.AppCompat" or similar will crash. This is normal and the exception will state that the theme will need to change.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/12353
FR Passed, waiting on Jenkins build and backport.
merged to master and 10_0_X for 10.0.0 release target.