Skip to content

Commit de237d3

Browse files
committed
fix(android): fix for pager+gesturehandlers
1 parent d06c6cf commit de237d3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ui-pager/index.android.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ export class Pager extends PagerBase {
335335
view.callUnloaded();
336336
}
337337
view._isAddedToNativeVisualTree = false;
338+
//@ts-ignore
339+
view.parent = null;
338340
view._tearDownUI();
339341
});
340342
this._viewHolders = new Set();
@@ -846,6 +848,8 @@ function initPagerRecyclerAdapter() {
846848
sp[PLACEHOLDER] = true;
847849
}
848850
sp._setupAsRootView(owner._context);
851+
//@ts-ignore
852+
sp.parent = owner;
849853
sp._isAddedToNativeVisualTree = true;
850854
sp.callLoaded();
851855
sp.nativeView.setLayoutParams(new android.view.ViewGroup.LayoutParams(android.view.ViewGroup.LayoutParams.MATCH_PARENT, android.view.ViewGroup.LayoutParams.MATCH_PARENT));
@@ -995,6 +999,8 @@ function initStaticPagerStateAdapter() {
995999
sp[PLACEHOLDER] = true;
9961000
}
9971001
sp._setupAsRootView(owner._context);
1002+
//@ts-ignore
1003+
sp.parent = owner;
9981004
sp._isAddedToNativeVisualTree = true;
9991005
sp.callLoaded();
10001006
sp.nativeView.setLayoutParams(new android.view.ViewGroup.LayoutParams(android.view.ViewGroup.LayoutParams.MATCH_PARENT, android.view.ViewGroup.LayoutParams.MATCH_PARENT));

0 commit comments

Comments
 (0)