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) {
//
}
}