refactoring circular imports

This commit is contained in:
Hristo Hristov
2017-03-06 14:01:22 +02:00
parent 347755367e
commit ea22eb9c20
82 changed files with 2229 additions and 2188 deletions

View File

@@ -1,9 +1,11 @@
import { Font } from "ui/styling/font";
import {
TabViewBase, TabViewItemBase, itemsProperty, selectedIndexProperty,
tabTextColorProperty, tabBackgroundColorProperty, selectedTabTextColorProperty,
androidSelectedTabHighlightColorProperty, androidOffscreenTabLimitProperty,
fontSizeProperty, fontInternalProperty, View, layout, Color, Font,
traceCategory, traceEnabled, traceWrite, initNativeView
fontSizeProperty, fontInternalProperty, View, layout,
traceCategory, traceEnabled, traceWrite, initNativeView, Color
} from "./tab-view-common"
import { textTransformProperty, TextTransform, getTransformedText } from "ui/text-base";
import { fromFileOrResource } from "image-source";
@@ -376,7 +378,7 @@ export class TabView extends TabViewBase {
if (value instanceof Color) {
this._tabLayout.setBackgroundColor(value.android);
} else {
this._tabLayout.setBackground(value.newDrawable());
this._tabLayout.setBackground(value ? value.newDrawable() : null);
}
}
@@ -384,7 +386,7 @@ export class TabView extends TabViewBase {
return this._tabLayout.getTabTextColor();
}
set [tabTextColorProperty.native](value: number | Color) {
let color = value instanceof Color ? value.android : value;
const color = value instanceof Color ? value.android : value;
this._tabLayout.setTabTextColor(color);
}
@@ -392,7 +394,7 @@ export class TabView extends TabViewBase {
return this._tabLayout.getSelectedTabTextColor();
}
set [selectedTabTextColorProperty.native](value: number | Color) {
let color = value instanceof Color ? value.android : value;
const color = value instanceof Color ? value.android : value;
this._tabLayout.setSelectedTabTextColor(color);
}
@@ -401,7 +403,7 @@ export class TabView extends TabViewBase {
}
set [androidSelectedTabHighlightColorProperty.native](value: number | Color) {
let tabLayout = this._tabLayout;
let color = value instanceof Color ? value.android : value;
const color = value instanceof Color ? value.android : value;
tabLayout.setSelectedIndicatorColors([color]);
}
}

View File

@@ -1,7 +1,9 @@
import {
import { Font } from "ui/styling/font";
import {
TabViewBase, TabViewItemBase, itemsProperty, selectedIndexProperty,
tabTextColorProperty, tabBackgroundColorProperty, selectedTabTextColorProperty, iosIconRenderingModeProperty,
Font, View, fontInternalProperty, layout, Color, traceEnabled, traceWrite, traceCategories
View, fontInternalProperty, layout, traceEnabled, traceWrite, traceCategories, Color
} from "./tab-view-common"
import { textTransformProperty, TextTransform, getTransformedText } from "ui/text-base";
@@ -397,7 +399,7 @@ export class TabView extends TabViewBase {
get [tabTextColorProperty.native](): UIColor {
return null;
}
set [tabTextColorProperty.native](value: UIColor) {
set [tabTextColorProperty.native](value: UIColor | Color) {
this._ios.tabBar.tintColor = value instanceof Color ? value.ios : value;
this._updateIOSTabBarColorsAndFonts();
}