Skip to content

Commit

Permalink
more functions
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Aug 20, 2024
1 parent 941b130 commit a84fa85
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,11 +409,8 @@ private void onTabIndexChangedTo(int index)
// First, update the proxy's "index" property.
proxy.setProperty(TiC.PROPERTY_INDEX, index);

if (this.tabLayout.getTabAt(index).getIcon() != null
&& proxy.hasPropertyAndNotNull(TiC.PROPERTY_ACTIVE_TINT_COLOR)) {
this.tabLayout.getTabAt(index).getIcon().setColorFilter(
TiConvert.toColor(proxy.getProperty(TiC.PROPERTY_ACTIVE_TINT_COLOR),
TiApplication.getAppCurrentActivity()), PorterDuff.Mode.SRC_IN);
if (proxy.hasPropertyAndNotNull(TiC.PROPERTY_ACTIVE_TINT_COLOR)) {
setTintColor(this.tabLayout.getTabAt(index), TiC.PROPERTY_ACTIVE_TINT_COLOR);
}

// Last, fire a "click" event.
Expand All @@ -429,10 +426,8 @@ private void onTabIndexChangedTo(int index)
public void onTabUnselected(TabLayout.Tab tab)
{
// set old tint color again
if (tab.getIcon() != null && proxy.hasPropertyAndNotNull(TiC.PROPERTY_TINT_COLOR)) {
tab.getIcon().setColorFilter(
TiConvert.toColor(proxy.getProperty(TiC.PROPERTY_TINT_COLOR), TiApplication.getAppCurrentActivity()),
PorterDuff.Mode.SRC_IN);
if (proxy.hasPropertyAndNotNull(TiC.PROPERTY_TINT_COLOR)) {
setTintColor(tab, TiC.PROPERTY_TINT_COLOR);
}
}

Expand Down

0 comments on commit a84fa85

Please sign in to comment.