mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 12:57:42 +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 tab = <tabView.TabView>view;
|
||||||
var count = tab.items ? tab.items.length : 0;
|
|
||||||
var tabLayout = tab._getAndroidTabView();
|
|
||||||
|
|
||||||
for (var i = 0; i < count; i++) {
|
if (tab.items && tab.items.length > 0) {
|
||||||
tabLayout.getTextViewForItemAt(i).setTextColor(nativeValue);
|
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;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _updateIOSTabBarColors() {
|
public _updateIOSTabBarColors(): void {
|
||||||
// iOS sepcific
|
// 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
|
//@private
|
||||||
_getAndroidTabView(): org.nativescript.widgets.TabLayout;
|
_getAndroidTabView(): org.nativescript.widgets.TabLayout;
|
||||||
_updateIOSTabBarColors();
|
_updateIOSTabBarColors(): void;
|
||||||
//@endprivate
|
//@endprivate
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -308,7 +308,7 @@ export class TabView extends common.TabView {
|
|||||||
(heightMode === utils.layout.UNSPECIFIED) ? Number.POSITIVE_INFINITY : height));
|
(heightMode === utils.layout.UNSPECIFIED) ? Number.POSITIVE_INFINITY : height));
|
||||||
}
|
}
|
||||||
|
|
||||||
public _updateIOSTabBarColors() {
|
public _updateIOSTabBarColors(): void {
|
||||||
if (!this.items) {
|
if (!this.items) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -325,12 +325,12 @@ export class TabView extends common.TabView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getTitleAttributesForStates(tabView: TabView): { normalState: any, selectedState: any } {
|
function getTitleAttributesForStates(tabView: TabView): { normalState: any, selectedState: any } {
|
||||||
var normalState = <any>{};
|
var normalState = {};
|
||||||
if (tabView.color instanceof color.Color) {
|
if (tabView.color instanceof color.Color) {
|
||||||
normalState[UITextAttributeTextColor] = tabView.color.ios;
|
normalState[UITextAttributeTextColor] = tabView.color.ios;
|
||||||
}
|
}
|
||||||
|
|
||||||
var selectedState = <any>{};
|
var selectedState = {};
|
||||||
if (tabView.selectedColor instanceof color.Color) {
|
if (tabView.selectedColor instanceof color.Color) {
|
||||||
selectedState[UITextAttributeTextColor] = tabView.selectedColor.ios;
|
selectedState[UITextAttributeTextColor] = tabView.selectedColor.ios;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user