Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28083] Android: Update dialogs to support material theme

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2021-03-05T15:57:29.000+0000
Affected Version/sn/a
Fix Version/sRelease 10.0.0
ComponentsAndroid
Labels2020-Q4, OptionDialog, alert, android, breaking-change, dialog, material-theme
ReporterJoshua Quick
AssigneeJoshua Quick
Created2020-08-13T23:47:45.000+0000
Updated2021-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.

Comments

  1. Joshua Quick 2020-12-19

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/12353
  2. Samir Mohammed 2021-03-02

    FR Passed, waiting on Jenkins build and backport.
  3. Christopher Williams 2021-03-05

    merged to master and 10_0_X for 10.0.0 release target.

JSON Source