Split get/set native to getDefault setNative

This commit is contained in:
Panayot Cankov
2017-03-21 14:42:53 +02:00
parent a777e16191
commit 2b28730011
60 changed files with 773 additions and 903 deletions

View File

@@ -48,17 +48,17 @@ export class Switch extends SwitchBase {
return this._android;
}
get [checkedProperty.native](): boolean {
[checkedProperty.getDefault](): boolean {
return false;
}
set [checkedProperty.native](value: boolean) {
[checkedProperty.setNative](value: boolean) {
this._android.setChecked(value);
}
get [colorProperty.native](): number {
[colorProperty.getDefault](): number {
return -1;
}
set [colorProperty.native](value: number | Color) {
[colorProperty.setNative](value: number | Color) {
if (value instanceof Color) {
this._android.getThumbDrawable().setColorFilter(value.android, android.graphics.PorterDuff.Mode.SRC_IN);
} else {
@@ -66,10 +66,10 @@ export class Switch extends SwitchBase {
}
}
get [backgroundColorProperty.native](): number {
[backgroundColorProperty.getDefault](): number {
return -1;
}
set [backgroundColorProperty.native](value: number | Color) {
[backgroundColorProperty.setNative](value: number | Color) {
if (value instanceof Color) {
this._android.getTrackDrawable().setColorFilter(value.android, android.graphics.PorterDuff.Mode.SRC_IN);
} else {
@@ -77,10 +77,10 @@ export class Switch extends SwitchBase {
}
}
get [backgroundInternalProperty.native](): any {
[backgroundInternalProperty.getDefault](): any {
return null;
}
set [backgroundInternalProperty.native](value: any) {
[backgroundInternalProperty.setNative](value: any) {
//
}
}

View File

@@ -62,31 +62,31 @@ export class Switch extends SwitchBase {
this.setMeasuredDimension(widthAndState, heightAndState);
}
get [checkedProperty.native](): boolean {
[checkedProperty.getDefault](): boolean {
return false;
}
set [checkedProperty.native](value: boolean) {
[checkedProperty.setNative](value: boolean) {
this._ios.on = value;
}
get [colorProperty.native](): UIColor {
[colorProperty.getDefault](): UIColor {
return this._ios.thumbTintColor;
}
set [colorProperty.native](value: UIColor | Color) {
[colorProperty.setNative](value: UIColor | Color) {
this._ios.thumbTintColor = value instanceof Color ? value.ios : value;
}
get [backgroundColorProperty.native](): UIColor {
[backgroundColorProperty.getDefault](): UIColor {
return this._ios.onTintColor;
}
set [backgroundColorProperty.native](value: UIColor | Color) {
[backgroundColorProperty.setNative](value: UIColor | Color) {
this._ios.onTintColor = value instanceof Color ? value.ios : value;
}
get [backgroundInternalProperty.native](): any {
[backgroundInternalProperty.getDefault](): any {
return null;
}
set [backgroundInternalProperty.native](value: any) {
[backgroundInternalProperty.setNative](value: any) {
//
}
}