Skip to content

Commit 06db014

Browse files
committed
fix(android): rollback change as it break inheritance
1 parent 7eb1ea4 commit 06db014

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

src/ui-pager/index.android.ts

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,14 @@ export class Pager extends PagerBase {
331331
disposeViewHolderViews() {
332332
this.enumerateViewHolders((v) => {
333333
const view = v.view;
334-
if (view && view.isLoaded) {
335-
view.callUnloaded();
336-
}
337-
view._isAddedToNativeVisualTree = false;
338-
//@ts-ignore
339-
view.parent = null;
340-
view._tearDownUI();
334+
// if (view && view.isLoaded) {
335+
// view.callUnloaded();
336+
// }
337+
this._removeViewCore(view)
338+
// view._isAddedToNativeVisualTree = false;
339+
// //@ts-ignore
340+
// view.parent = null;
341+
// view._tearDownUI();
341342
});
342343
this._viewHolders = new Set();
343344
}
@@ -847,11 +848,12 @@ function initPagerRecyclerAdapter() {
847848
} else {
848849
sp[PLACEHOLDER] = true;
849850
}
850-
sp._setupAsRootView(owner._context);
851-
//@ts-ignore
852-
sp.parent = owner;
853-
sp._isAddedToNativeVisualTree = true;
854-
sp.callLoaded();
851+
owner._addView(sp);
852+
// sp._setupAsRootView(owner._context);
853+
// //@ts-ignore
854+
// sp.parent = owner;
855+
// sp._isAddedToNativeVisualTree = true;
856+
// sp.callLoaded();
855857
sp.nativeView.setLayoutParams(new android.view.ViewGroup.LayoutParams(android.view.ViewGroup.LayoutParams.MATCH_PARENT, android.view.ViewGroup.LayoutParams.MATCH_PARENT));
856858

857859
initPagerViewHolder();
@@ -998,11 +1000,12 @@ function initStaticPagerStateAdapter() {
9981000
} else {
9991001
sp[PLACEHOLDER] = true;
10001002
}
1001-
sp._setupAsRootView(owner._context);
1002-
//@ts-ignore
1003-
sp.parent = owner;
1004-
sp._isAddedToNativeVisualTree = true;
1005-
sp.callLoaded();
1003+
owner._addView(sp);
1004+
// sp._setupAsRootView(owner._context);
1005+
// //@ts-ignore
1006+
// sp.parent = owner;
1007+
// sp._isAddedToNativeVisualTree = true;
1008+
// sp.callLoaded();
10061009
sp.nativeView.setLayoutParams(new android.view.ViewGroup.LayoutParams(android.view.ViewGroup.LayoutParams.MATCH_PARENT, android.view.ViewGroup.LayoutParams.MATCH_PARENT));
10071010

10081011
initPagerViewHolder();

0 commit comments

Comments
 (0)