|
1 | 1 | import { TabContentItem } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-content-item'; |
2 | | -import { TabNavigationBase, itemsProperty, selectedIndexProperty, tabStripProperty } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-navigation-base'; |
| 2 | +import { TabNavigationBase, itemsProperty, selectedIndexProperty, tabStripProperty, getIconSpecSize } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-navigation-base'; |
3 | 3 | import { TabStrip } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-strip'; |
4 | 4 | import { TabStripItem } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-strip-item'; |
5 | 5 | // Types |
6 | 6 | // Requires |
7 | | -import { Application, CSSType, Color, Font, Frame, ImageSource, Utils, View, getIconSpecSize } from '@nativescript/core'; |
8 | | -import { TextTransform, getTransformedText } from '@nativescript/core/ui/text-base'; |
| 7 | +import { Application, CSSType, Color, Font, Frame, ImageSource, Utils, View, Enums } from '@nativescript/core'; |
| 8 | +import { getTransformedText } from '@nativescript/core/ui/text-base'; |
9 | 9 | export { TabContentItem, TabStrip, TabStripItem }; |
10 | 10 |
|
11 | 11 | // TODO: Impl trace |
@@ -243,13 +243,13 @@ function iterateIndexRange(index: number, eps: number, lastIndex: number, callba |
243 | 243 | @CSSType('BottomNavigation') |
244 | 244 | export class BottomNavigation extends TabNavigationBase { |
245 | 245 | private _contentView: org.nativescript.widgets.ContentLayout; |
246 | | - private _contentViewId: number = -1; |
| 246 | + private _contentViewId = -1; |
247 | 247 | private _bottomNavigationBar: org.nativescript.widgets.BottomNavigationBar; |
248 | 248 | private _currentFragment: androidx.fragment.app.Fragment; |
249 | 249 | private _currentTransaction: androidx.fragment.app.FragmentTransaction; |
250 | 250 | private _attachedToWindow = false; |
251 | 251 | public _originalBackground: any; |
252 | | - private _textTransform: TextTransform = 'none'; |
| 252 | + private _textTransform: Enums.TextTransformType = 'none'; |
253 | 253 | private _selectedItemColor: Color; |
254 | 254 | private _unSelectedItemColor: Color; |
255 | 255 |
|
@@ -675,9 +675,9 @@ export class BottomNavigation extends TabNavigationBase { |
675 | 675 | }); |
676 | 676 | } |
677 | 677 |
|
678 | | - private getItemLabelTextTransform(tabStripItem: TabStripItem): TextTransform { |
| 678 | + private getItemLabelTextTransform(tabStripItem: TabStripItem): Enums.TextTransformType { |
679 | 679 | const nestedLabel = tabStripItem.label; |
680 | | - let textTransform: TextTransform = null; |
| 680 | + let textTransform: Enums.TextTransformType = null; |
681 | 681 | if (nestedLabel && nestedLabel.style.textTransform !== 'initial') { |
682 | 682 | textTransform = nestedLabel.style.textTransform; |
683 | 683 | } else if (tabStripItem.style.textTransform !== 'initial') { |
@@ -924,17 +924,17 @@ export class BottomNavigation extends TabNavigationBase { |
924 | 924 | tabStripItem.nativeViewProtected.setTypeface(value.getAndroidTypeface()); |
925 | 925 | } |
926 | 926 |
|
927 | | - public setTabBarItemTextTransform(tabStripItem: TabStripItem, value: TextTransform): void { |
| 927 | + public setTabBarItemTextTransform(tabStripItem: TabStripItem, value: Enums.TextTransformType): void { |
928 | 928 | const titleLabel = tabStripItem.label; |
929 | 929 | const title = getTransformedText(titleLabel.text, value); |
930 | 930 | tabStripItem.nativeViewProtected.setText(title); |
931 | 931 | } |
932 | 932 |
|
933 | | - public getTabBarTextTransform(): TextTransform { |
| 933 | + public getTabBarTextTransform(): Enums.TextTransformType { |
934 | 934 | return this._textTransform; |
935 | 935 | } |
936 | 936 |
|
937 | | - public setTabBarTextTransform(value: TextTransform): void { |
| 937 | + public setTabBarTextTransform(value: Enums.TextTransformType): void { |
938 | 938 | const items = this.tabStrip && this.tabStrip.items; |
939 | 939 | if (items) { |
940 | 940 | items.forEach((tabStripItem) => { |
|
0 commit comments