[TIMOB-26734] Android: Add "activeTabIconTint" support to TabGroup
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | TabGroup, android, icon, parity, tab, tintColor |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2019-01-15T19:43:52.000+0000 |
Updated | 2021-02-03T21:11:55.000+0000 |
Description
*Summary:*
iOS
TabGroup
currently supports [activeTabIconTint](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TabGroup-property-activeTabIconTint) which applies a color tint to the currently selected tab's icon. We would like to add the same to Android for parity.
*Note:*
Theoretically, you should be able to do this now via a res/drawable "selector" XML file as shown below, but I haven't tested it.
https://github.com/appcelerator/titanium_mobile/pull/10358#issuecomment-454525273
[BottomNavigationMenuView.setIconTintList(ColorStateList tint)](https://github.com/material-components/material-components-android/blob/bf8b3e9337b86dbffb4b7dfbf59ece555991feb6/lib/java/com/google/android/material/bottomnavigation/BottomNavigationMenuView.java#L244)
https://github.com/appcelerator/titanium_mobile/compare/master...drauggres:TIMOB-26734?expand=1 Only problem with this approach is that developer must define a color for the "not active" state in xml (otherwise it would be taken from the theme), e.g.: