mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(android): tap-trip-item title disappearing
This commit is contained in:
@@ -391,7 +391,7 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
if (this._manager && this._manager.isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
this._attachedToWindow = true;
|
||||
this.changeTab(this.selectedIndex);
|
||||
}
|
||||
@@ -705,7 +705,10 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
}
|
||||
|
||||
public setTabBarItemFontInternal(tabStripItem: TabStripItem, value: Font): void {
|
||||
tabStripItem.nativeViewProtected.setTextSize(value.fontSize);
|
||||
if (value.fontSize) {
|
||||
tabStripItem.nativeViewProtected.setTextSize(value.fontSize);
|
||||
}
|
||||
|
||||
tabStripItem.nativeViewProtected.setTypeface(value.getAndroidTypeface());
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ export class TabStripItem extends View implements TabStripItemDefinition, AddChi
|
||||
const parent = <TabStrip>this.parent;
|
||||
const tabStripParent = parent && <TabNavigationBase>parent.parent;
|
||||
|
||||
return tabStripParent && (<any>tabStripParent).setTabBarIconColor(this, args.value);
|
||||
return tabStripParent && tabStripParent.setTabBarIconColor(this, args.value);
|
||||
});
|
||||
this.image.style.on("colorChange", this._imageColorHandler);
|
||||
|
||||
@@ -135,7 +135,7 @@ export class TabStripItem extends View implements TabStripItemDefinition, AddChi
|
||||
const parent = <TabStrip>this.parent;
|
||||
const tabStripParent = parent && <TabNavigationBase>parent.parent;
|
||||
|
||||
return tabStripParent && (<any>tabStripParent).setTabBarIconColor(this, args.value);
|
||||
return tabStripParent && tabStripParent.setTabBarIconColor(this, args.value);
|
||||
});
|
||||
this.image.style.on("fontInternalChange", this._imageFontHandler);
|
||||
|
||||
@@ -143,7 +143,7 @@ export class TabStripItem extends View implements TabStripItemDefinition, AddChi
|
||||
const parent = <TabStrip>this.parent;
|
||||
const tabStripParent = parent && <TabNavigationBase>parent.parent;
|
||||
|
||||
return tabStripParent && (<any>tabStripParent).setTabBarIconColor(this, args.value);
|
||||
return tabStripParent && tabStripParent.setTabBarIconColor(this, args.value);
|
||||
});
|
||||
this.image.on("srcChange", this._imageSrcHandler);
|
||||
}
|
||||
|
||||
@@ -819,7 +819,9 @@ export class Tabs extends TabsBase {
|
||||
}
|
||||
|
||||
public setTabBarItemFontInternal(tabStripItem: TabStripItem, value: Font): void {
|
||||
tabStripItem.nativeViewProtected.setTextSize(value.fontSize);
|
||||
if (value.fontSize) {
|
||||
tabStripItem.nativeViewProtected.setTextSize(value.fontSize);
|
||||
}
|
||||
tabStripItem.nativeViewProtected.setTypeface(value.getAndroidTypeface());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user