mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Android TabView should use tabTextColorProperty instead of colorProperty just like in iOS
This commit is contained in:
@ -4,7 +4,6 @@ import helper = require("../helper");
|
||||
import labelModule = require("ui/label");
|
||||
import stackLayoutModule = require("ui/layouts/stack-layout");
|
||||
import tabViewTestsNative = require("./tab-view-tests-native");
|
||||
import style = require("ui/styling/style");
|
||||
import { resetStyleProperties } from "ui/core/view";
|
||||
|
||||
// Using a TabView requires the "ui/tab-view" module.
|
||||
@ -331,7 +330,7 @@ export class TabViewTest extends testModule.UITest<tabViewModule.TabView> {
|
||||
assertFontsAreEqual(tabViewTestsNative.getNativeFont(this.testView), nativeFont, "Font must be bold 12 monospace after rebinding items.");
|
||||
//console.log(`>>>>>>>>>>>>> nativeFont: ${fontToString(nativeFont)}`);
|
||||
|
||||
//console.log(`>>>>>>>>>>>>> RESET`);
|
||||
console.log(`>>>>>>>>>>>>> RESET`);
|
||||
resetStyleProperties(this.testView.style);
|
||||
assertFontsAreEqual(tabViewTestsNative.getNativeFont(this.testView), originalFont, "Font must be the original one after resetting the style.");
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import {
|
||||
TabViewBase, TabViewItemBase, itemsProperty, selectedIndexProperty,
|
||||
tabTextColorProperty, tabBackgroundColorProperty, selectedTabTextColorProperty,
|
||||
androidSelectedTabHighlightColorProperty, androidOffscreenTabLimitProperty,
|
||||
fontInternalProperty, traceCategory, View, colorProperty, layout, Color, Font, traceEnabled, traceWrite
|
||||
fontInternalProperty, traceCategory, View, layout, Color, Font, traceEnabled, traceWrite
|
||||
} from "./tab-view-common"
|
||||
import { textTransformProperty, TextTransform, getTransformedText } from "ui/text-base";
|
||||
import { fromFileOrResource } from "image-source";
|
||||
@ -323,10 +323,10 @@ export class TabView extends TabViewBase {
|
||||
this.setAdapter(value);
|
||||
}
|
||||
|
||||
get [colorProperty.native](): number {
|
||||
get [tabTextColorProperty.native](): number {
|
||||
return this._tabLayout.getTabTextColor();
|
||||
}
|
||||
set [colorProperty.native](value: number | Color) {
|
||||
set [tabTextColorProperty.native](value: number | Color) {
|
||||
let color = value instanceof Color ? value.android : value;
|
||||
this._tabLayout.setTabTextColor(color);
|
||||
}
|
||||
|
@ -402,7 +402,6 @@ export class TabView extends TabViewBase {
|
||||
this.setViewControllers(value);
|
||||
}
|
||||
|
||||
|
||||
get [tabTextColorProperty.native](): UIColor {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user