diff --git a/android/sdk/src/main/java/com/tencent/mtt/hippy/views/hippylist/HippyRecyclerView.java b/android/sdk/src/main/java/com/tencent/mtt/hippy/views/hippylist/HippyRecyclerView.java index 71afca053f6..0c7d13c1da6 100644 --- a/android/sdk/src/main/java/com/tencent/mtt/hippy/views/hippylist/HippyRecyclerView.java +++ b/android/sdk/src/main/java/com/tencent/mtt/hippy/views/hippylist/HippyRecyclerView.java @@ -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