mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: private methods renamed
This commit is contained in:
@@ -754,10 +754,10 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
tabStripItem.nativeViewProtected.setTextColor(itemColor.android);
|
||||
|
||||
// set icon color
|
||||
this._setIconColor(tabStripItem, itemColor);
|
||||
this.setIconColor(tabStripItem, itemColor);
|
||||
}
|
||||
|
||||
private _setIconColor(tabStripItem: TabStripItem, color?: Color) {
|
||||
private setIconColor(tabStripItem: TabStripItem, color?: Color) {
|
||||
const tabBarItem = this._bottomNavigationBar.getViewForItemAt(tabStripItem._index);
|
||||
|
||||
const drawableInfo = this.getIconInfo(tabStripItem, color);
|
||||
|
||||
@@ -374,7 +374,7 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
}
|
||||
|
||||
public setTabBarItemColor(tabStripItem: TabStripItem, value: UIColor | Color): void {
|
||||
this.setViewTextAttributes(tabStripItem.nativeView, tabStripItem.label);
|
||||
this.setViewAttributes(tabStripItem.nativeView, tabStripItem.label);
|
||||
}
|
||||
|
||||
public setTabBarIconColor(tabStripItem: TabStripItem, value: UIColor | Color): void {
|
||||
@@ -387,7 +387,7 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
}
|
||||
|
||||
public setTabBarItemFontInternal(tabStripItem: TabStripItem, value: Font): void {
|
||||
this.setViewTextAttributes(tabStripItem.nativeView, tabStripItem.label);
|
||||
this.setViewAttributes(tabStripItem.nativeView, tabStripItem.label);
|
||||
}
|
||||
|
||||
public setTabBarItemTextTransform(tabStripItem: TabStripItem, value: TextTransform): void {
|
||||
@@ -541,7 +541,7 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
const tabBarItem = this.createTabBarItem(tabStripItem, i);
|
||||
updateTitleAndIconPositions(tabStripItem, tabBarItem, controller);
|
||||
|
||||
this.setViewTextAttributes(tabBarItem, tabStripItem.label);
|
||||
this.setViewAttributes(tabBarItem, tabStripItem.label);
|
||||
|
||||
controller.tabBarItem = tabBarItem;
|
||||
tabStripItem._index = i;
|
||||
@@ -551,7 +551,7 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
controllers.addObject(controller);
|
||||
});
|
||||
|
||||
this._setItemImages();
|
||||
this.setItemImages();
|
||||
|
||||
this._ios.viewControllers = controllers;
|
||||
this._ios.customizableViewControllers = null;
|
||||
@@ -560,7 +560,7 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
this._ios.moreNavigationController.delegate = this._moreNavigationControllerDelegate;
|
||||
}
|
||||
|
||||
private _setItemImages() {
|
||||
private setItemImages() {
|
||||
if (this._selectedItemColor || this._unSelectedItemColor) {
|
||||
if (this.tabStrip && this.tabStrip.items) {
|
||||
this.tabStrip.items.forEach(item => {
|
||||
@@ -730,7 +730,7 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
selectedIndexProperty.coerce(this);
|
||||
}
|
||||
|
||||
private setViewTextAttributes(item: UITabBarItem, view: View): any {
|
||||
private setViewAttributes(item: UITabBarItem, view: View): any {
|
||||
if (!view) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -846,10 +846,10 @@ export class Tabs extends TabsBase {
|
||||
tabStripItem.nativeViewProtected.setTextColor(itemColor.android);
|
||||
|
||||
// set icon color
|
||||
this._setIconColor(tabStripItem, itemColor);
|
||||
this.setIconColor(tabStripItem, itemColor);
|
||||
}
|
||||
|
||||
private _setIconColor(tabStripItem: TabStripItem, color?: Color) {
|
||||
private setIconColor(tabStripItem: TabStripItem, color?: Color) {
|
||||
const tabBarItem = this._tabsBar.getViewForItemAt(tabStripItem._index);
|
||||
|
||||
const drawable = this.getIcon(tabStripItem, color);
|
||||
|
||||
Reference in New Issue
Block a user