Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -905,4 +905,39 @@ public interface PageListener {
*/
void onPageSelect(int pageIndex);
}

// region 解决嵌套滑动冲突

@Override
public int computeHorizontalScrollOffset(@NonNull RecyclerView.State state) {
return offsetX;
}

@Override
public int computeHorizontalScrollRange(@NonNull RecyclerView.State state) {
return mMaxScrollX + getUsableWidth();
}

@Override
public int computeHorizontalScrollExtent(@NonNull RecyclerView.State state) {
return getUsableWidth();
}

@Override
public int computeVerticalScrollOffset(@NonNull RecyclerView.State state) {
return offsetY;
}

@Override
public int computeVerticalScrollRange(@NonNull RecyclerView.State state) {
return mMaxScrollY + getUsableHeight();
}

@Override
public int computeVerticalScrollExtent(@NonNull RecyclerView.State state) {
return getUsableHeight();
}

// endregion

}