mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Fixes
This commit is contained in:
@ -662,11 +662,13 @@ export class TabViewStyler implements definition.stylers.Styler {
|
||||
}
|
||||
|
||||
var tab = <tabView.TabView>view;
|
||||
var count = tab.items ? tab.items.length : 0;
|
||||
var tabLayout = tab._getAndroidTabView();
|
||||
|
||||
for (var i = 0; i < count; i++) {
|
||||
tabLayout.getTextViewForItemAt(i).setTextColor(nativeValue);
|
||||
if (tab.items && tab.items.length > 0) {
|
||||
var tabLayout = tab._getAndroidTabView();
|
||||
|
||||
for (var i = 0; i < tab.items.length; i++) {
|
||||
tabLayout.getTextViewForItemAt(i).setTextColor(nativeValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -257,7 +257,7 @@ export class TabView extends view.View implements definition.TabView, view.AddAr
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public _updateIOSTabBarColors() {
|
||||
public _updateIOSTabBarColors(): void {
|
||||
// iOS sepcific
|
||||
}
|
||||
}
|
2
ui/tab-view/tab-view.d.ts
vendored
2
ui/tab-view/tab-view.d.ts
vendored
@ -96,7 +96,7 @@ declare module "ui/tab-view" {
|
||||
|
||||
//@private
|
||||
_getAndroidTabView(): org.nativescript.widgets.TabLayout;
|
||||
_updateIOSTabBarColors();
|
||||
_updateIOSTabBarColors(): void;
|
||||
//@endprivate
|
||||
}
|
||||
}
|
@ -308,7 +308,7 @@ export class TabView extends common.TabView {
|
||||
(heightMode === utils.layout.UNSPECIFIED) ? Number.POSITIVE_INFINITY : height));
|
||||
}
|
||||
|
||||
public _updateIOSTabBarColors() {
|
||||
public _updateIOSTabBarColors(): void {
|
||||
if (!this.items) {
|
||||
return;
|
||||
}
|
||||
@ -325,12 +325,12 @@ export class TabView extends common.TabView {
|
||||
}
|
||||
|
||||
function getTitleAttributesForStates(tabView: TabView): { normalState: any, selectedState: any } {
|
||||
var normalState = <any>{};
|
||||
var normalState = {};
|
||||
if (tabView.color instanceof color.Color) {
|
||||
normalState[UITextAttributeTextColor] = tabView.color.ios;
|
||||
}
|
||||
|
||||
var selectedState = <any>{};
|
||||
var selectedState = {};
|
||||
if (tabView.selectedColor instanceof color.Color) {
|
||||
selectedState[UITextAttributeTextColor] = tabView.selectedColor.ios;
|
||||
}
|
||||
|
Reference in New Issue
Block a user