Skip to content

Commit

Permalink
fix(android): keep Tab tintColor when changing icons
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Jul 12, 2024
1 parent 52cab42 commit c3380f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,9 @@ public void updateTabIcon(int index)
if (tabProxy == null) {
return;
}

final Drawable drawable = TiUIHelper.getResourceDrawable(tabProxy.getProperty(TiC.PROPERTY_ICON));
this.mBottomNavigationView.getMenu().getItem(index).setIcon(drawable);
updateIconTint();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ public void updateTabIcon(int index)
TabLayout.Tab tab = this.mTabLayout.getTabAt(index);
tab.setIcon(TiUIHelper.getResourceDrawable(tabProxy.getProperty(TiC.PROPERTY_ICON)));
scaleIconToFit(tab);
updateIconTint();
}

@Override
Expand Down

0 comments on commit c3380f9

Please sign in to comment.