fix: setting icon color

This commit is contained in:
Vasko
2020-03-12 18:56:35 +02:00
parent 4711d3618f
commit 1ae0abc4f6
2 changed files with 6 additions and 11 deletions

View File

@@ -598,10 +598,8 @@ export class BottomNavigation extends TabNavigationBase {
tabItemSpec.backgroundColor = backgroundColor ? backgroundColor.android : this.getTabBarBackgroundArgbColor();
// COLOR
let color = this.selectedIndex === tabStripItem._index ? this._selectedItemColor : this._unSelectedItemColor;
if (!color) {
color = titleLabel.style.color;
}
let rowColor = this.selectedIndex === tabStripItem._index ? this._selectedItemColor : this._unSelectedItemColor;
const color = rowColor || titleLabel.style.color;
tabItemSpec.color = color && color.android;
// FONT
@@ -614,7 +612,7 @@ export class BottomNavigation extends TabNavigationBase {
// ICON
const iconSource = tabStripItem.image && tabStripItem.image.src;
if (iconSource) {
const iconInfo = this.getIconInfo(tabStripItem, color);
const iconInfo = this.getIconInfo(tabStripItem, rowColor);
if (iconInfo) {
// TODO: Make this native call that accepts string so that we don't load Bitmap in JS.

View File

@@ -669,11 +669,8 @@ export class Tabs extends TabsBase {
tabItemSpec.backgroundColor = backgroundColor ? backgroundColor.android : this.getTabBarBackgroundArgbColor();
// COLOR
let color = this.selectedIndex === tabStripItem._index ? this._selectedItemColor : this._unSelectedItemColor;
if (!color) {
color = nestedLabel.style.color;
}
let rowColor = this.selectedIndex === tabStripItem._index ? this._selectedItemColor : this._unSelectedItemColor;
const color = rowColor || nestedLabel.style.color;
tabItemSpec.color = color && color.android;
// FONT
@@ -686,7 +683,7 @@ export class Tabs extends TabsBase {
// ICON
const iconSource = tabStripItem.image && tabStripItem.image.src;
if (iconSource) {
const icon = this.getIcon(tabStripItem, color);
const icon = this.getIcon(tabStripItem, rowColor);
if (icon) {
// TODO: Make this native call that accepts string so that we don't load Bitmap in JS.