[TIMOB-28493] Custom Theme on SDK 10 fails with Titanium.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION on tabs
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2021-06-23T18:12:36.000+0000 |
Affected Version/s | Release 10.0.0 |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Ray Belisle |
Assignee | Joshua Quick |
Created | 2021-06-10T17:08:44.000+0000 |
Updated | 2021-06-23T18:12:36.000+0000 |
Description
When creating a custom theme in SDK10 using a material theme as the parent, create a tab group and set the style to Titanium.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION.
If you set the following property in the style XML file:
When you load the app, it will fail referencing issues with *APPCOMPAT* so I believe that the bottom navigation configuration is still referencing the old theme structure instead of the new one.
master: https://github.com/appcelerator/titanium_mobile/pull/12908
[~raybelisle], this is not a Titanium bug. It's a limitation in Google's material components/widgets which Titanium switch to as of Titanium 10.0.0. Please see the following issue report submitted to Google below since it's the exact same issue you're facing. https://github.com/material-components/material-components-android/issues/226 Basically, Google's bottom tabs widget does *NOT* accept raw color values for the "textColorSecondary" style. Instead, you must assign it a color constant. For example, use an
\@android:color/*
constant as shown below...Alternatively, set up your own color constant like this...
That said, the top and bottom "material" tabs ignore the "textColorSecondary" primary style. They use the "colorPrimary" and "colorOnSurface" styles instead for the text/icon colors. Please see the "Tab item text label attributes" section in the link below where Google fully documents all styles used. https://material.io/components/tabs/android#scrollable-tabs
@Joshua Quick, that was great. Thanks for the information! All working now!