mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Merge branch 'master' into svetoslavtsenov/merge-release-in-master
This commit is contained in:
@@ -57,13 +57,19 @@ function initializeTouchListener(): void {
|
|||||||
|
|
||||||
@Interfaces([android.view.View.OnTouchListener])
|
@Interfaces([android.view.View.OnTouchListener])
|
||||||
class TouchListenerImpl extends java.lang.Object implements android.view.View.OnTouchListener {
|
class TouchListenerImpl extends java.lang.Object implements android.view.View.OnTouchListener {
|
||||||
constructor(private owner: View) {
|
private owner: WeakRef<View>;
|
||||||
|
constructor(owner: View) {
|
||||||
super();
|
super();
|
||||||
|
this.owner = new WeakRef(owner);
|
||||||
|
|
||||||
return global.__native(this);
|
return global.__native(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
onTouch(view: android.view.View, event: android.view.MotionEvent): boolean {
|
onTouch(view: android.view.View, event: android.view.MotionEvent): boolean {
|
||||||
const owner = this.owner;
|
const owner = this.owner.get();
|
||||||
|
if (!owner) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
owner.handleGestureTouch(event);
|
owner.handleGestureTouch(event);
|
||||||
|
|
||||||
let nativeView = owner.nativeViewProtected;
|
let nativeView = owner.nativeViewProtected;
|
||||||
@@ -211,7 +217,7 @@ function initializeDialogFragment() {
|
|||||||
const owner = this.owner;
|
const owner = this.owner;
|
||||||
|
|
||||||
if (owner) {
|
if (owner) {
|
||||||
// Android calls onDestroy before onDismiss.
|
// Android calls onDestroy before onDismiss.
|
||||||
// Make sure we unload first and then call _tearDownUI.
|
// Make sure we unload first and then call _tearDownUI.
|
||||||
if (owner.isLoaded) {
|
if (owner.isLoaded) {
|
||||||
owner.callUnloaded();
|
owner.callUnloaded();
|
||||||
@@ -298,7 +304,7 @@ export class View extends ViewCommon {
|
|||||||
let view: View = this;
|
let view: View = this;
|
||||||
let frameOrTabViewItemFound = false;
|
let frameOrTabViewItemFound = false;
|
||||||
while (view) {
|
while (view) {
|
||||||
// when interacting with nested fragments instead of using getSupportFragmentManager
|
// when interacting with nested fragments instead of using getSupportFragmentManager
|
||||||
// we must always use getChildFragmentManager instead;
|
// we must always use getChildFragmentManager instead;
|
||||||
// we have three sources of fragments -- Frame fragments, TabViewItem fragments, and
|
// we have three sources of fragments -- Frame fragments, TabViewItem fragments, and
|
||||||
// modal dialog fragments
|
// modal dialog fragments
|
||||||
@@ -1026,4 +1032,4 @@ createNativePercentLengthProperty({
|
|||||||
createNativePercentLengthProperty({
|
createNativePercentLengthProperty({
|
||||||
setter: "_setMinHeightNative",
|
setter: "_setMinHeightNative",
|
||||||
get setPixels() { return org.nativescript.widgets.ViewHelper.setMinHeight }
|
get setPixels() { return org.nativescript.widgets.ViewHelper.setMinHeight }
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user