[TIMOB-27714] Android: Add "Material Components" theme support
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-11-25T14:59:00.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.3.0 |
Components | Android |
Labels | 2020-Q4, android, material-theme, style, theme |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2020-01-09T22:28:44.000+0000 |
Updated | 2020-11-25T14:59:00.000+0000 |
Description
*Summary:*
Titanium currently defaults to the "Theme.AppCompat" style.
We should change the default style to "Theme.MaterialComponents.Bridge", which allows to support Google's material widget classes. Without this theme, these widgets will throw an exception since the material theme contains styles they need.
https://www.material.io
https://github.com/material-components/material-components-android
Using the material "bridge" theme keeps the current "dark" AppCompat theme so that it won't be a breaking change for app developers. If developers want to use Google's other material themes, then they can set it via the
<application/>
element in the "tiapp.xml" file AndroidManfiest.xml section.
PR (9.3.x): https://github.com/appcelerator/titanium_mobile/pull/11921
PR (kitchensink-v2): https://github.com/appcelerator/kitchensink-v2/pull/53 PR (hyperloop-example): https://github.com/appcelerator/hyperloop-examples/pull/86 _*Note:* The above PR changes will work on Titanium 9.0.0 and higher. They do not depend on the Titanium SDK 9.3.0 PR._
FR Passed, waiting on Jenkins builds.
*Closing ticket*. Improvement verified in SDK version
9.3.0.v20201125050632
. *Test and other information can be found at: *https://github.com/appcelerator/titanium_mobile/pull/11921