mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix: set item color
This commit is contained in:
@@ -576,6 +576,7 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
items.forEach((item, i, arr) => {
|
||||
const textView = this._bottomNavigationBar.getTextViewForItemAt(i);
|
||||
item.setNativeView(textView);
|
||||
this._setItemColor(item);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -639,6 +639,7 @@ export class Tabs extends TabsBase {
|
||||
items.forEach((item, i, arr) => {
|
||||
const tv = tabsBar.getTextViewForItemAt(i);
|
||||
item.setNativeView(tv);
|
||||
this._setItemColor(item);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -198,9 +198,6 @@ public class BottomNavigationBar extends LinearLayout {
|
||||
} else if (tabItem.iconDrawable != null) {
|
||||
imgView.setImageDrawable(tabItem.iconDrawable);
|
||||
imgView.setVisibility(VISIBLE);
|
||||
if (tabItem.color != 0) {
|
||||
imgView.setColorFilter(tabItem.color);
|
||||
}
|
||||
} else {
|
||||
imgView.setVisibility(GONE);
|
||||
}
|
||||
|
||||
@@ -272,9 +272,6 @@ public class TabsBar extends HorizontalScrollView {
|
||||
} else if (tabItem.iconDrawable != null) {
|
||||
imgView.setImageDrawable(tabItem.iconDrawable);
|
||||
imgView.setVisibility(VISIBLE);
|
||||
if (tabItem.color != 0) {
|
||||
imgView.setColorFilter(tabItem.color);
|
||||
}
|
||||
} else {
|
||||
imgView.setVisibility(GONE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user