android: list's scrolledPosition should align to iOS

This commit is contained in:
pengfei.zhou 2023-07-31 15:21:06 +08:00 committed by jingpeng
parent 9494b9d8b1
commit e3ca9ae5d4

View File

@ -382,7 +382,9 @@ public class ListNode extends SuperNode<RecyclerView> implements IDoricScrollabl
view.post(new Runnable() {
@Override
public void run() {
moveToPosition(prop.asNumber().toInt(), false);
LinearLayoutManager layoutManager = (LinearLayoutManager) mView.getLayoutManager();
assert layoutManager != null;
layoutManager.scrollToPositionWithOffset(prop.asNumber().toInt(), 0);
}
});
break;