-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
hhristov/recycle native view android #3885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
this.nativeView = this._iosView = (<any>this)._nativeView; | ||
this.createNativeView(); | ||
if (!currentNativeView) { | ||
console.log(`${this.typeName} doesnt have NativeView !!!!! =================`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log
} | ||
} | ||
|
||
[maxDateProperty.getDefault](): Date { | ||
return this.android.getMaxDate(); | ||
return this.nativeView.getMaxDate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return type should be number
} | ||
} | ||
|
||
[maxDateProperty.getDefault](): Date { | ||
return this.android.getMaxDate(); | ||
return this.nativeView.getMaxDate(); | ||
} | ||
[maxDateProperty.setNative](value: Date) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value type should be Date | number
} | ||
|
||
[minDateProperty.getDefault](): Date { | ||
return this.android.getMinDate(); | ||
return this.nativeView.getMinDate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return type should be number
} | ||
|
||
// public _resetNativeView(force?: boolean) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete?
|
||
public onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void { | ||
var nativeView = this._nativeView; | ||
var nativeView = this._ios; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.nativeView
} | ||
|
||
const validTime = getValidTime(timePicker, hour, minute); | ||
hourProperty.nativeValueChange(timePicker, validTime.hour); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete those - not needed
createNativeView will set iOS nativeView if it is null/undefined
d2ace2f
to
e6250e7
Compare
widgets |
widgets-uitests-android |
widgets-uitests-ios |
there are some failures for iOS that require to look into them. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Rename:
_createNativeView to createNativeView;
_initNativeView to initNativeView
_disposeNativeView to disposeNativeView
_resetNativeView to resetNativeView