Skip to content

Commit

Permalink
fix(android): initialContentOffset not working
Browse files Browse the repository at this point in the history
  • Loading branch information
iPel authored and zealotchen0 committed Aug 7, 2023
1 parent 702e4a6 commit a51fdc0
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,8 @@ public void setListData() {
}

renderNodeCount = listAdapter.getRenderNodeCount();
if (renderNodeCount > 0) {
if (mInitialContentOffset > 0 && getChildCount() > 0) {
scrollToInitContentOffset();
}
if (renderNodeCount > 0 && mInitialContentOffset > 0) {
scrollToInitContentOffset();
}
//notifyDataSetChanged 本身是可以触发requestLayout的,但是Hippy框架下 HippyRootView 已经把
//onLayout方法重载写成空方法,requestLayout不会回调孩子节点的onLayout,这里需要自己发起dispatchLayout
Expand Down

0 comments on commit a51fdc0

Please sign in to comment.