Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26734] Android: Add "activeTabIconTint" support to TabGroup

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
LabelsTabGroup, android, icon, parity, tab, tintColor
ReporterJoshua Quick
AssigneeJoshua Quick
Created2019-01-15T19:43:52.000+0000
Updated2021-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

Comments

  1. Sergey Volkov 2019-09-05

    [BottomNavigationMenuView.setIconTintList(ColorStateList tint)](https://github.com/material-components/material-components-android/blob/bf8b3e9337b86dbffb4b7dfbf59ece555991feb6/lib/java/com/google/android/material/bottomnavigation/BottomNavigationMenuView.java#L244)
  2. Sergey Volkov 2019-09-09

    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.:
       <style name="Theme.MyAppTheme" parent="@style/Theme.AppCompat">
       	<item name="android:actionBarStyle">@style/Theme.MyAppTheme.ActionBar</item>
       	<item name="actionBarStyle">@style/Theme.MyAppTheme.ActionBar</item>
       </style>
       
       <style name="Theme.MyAppTheme.ActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid">
       	<item name="colorControlNormal">@color/my_color</item>
       </style>
       
       <color name="my_color">#8a000000</color>
       
  3. Sergey Volkov 2021-02-03

JSON Source