📜  删除 ViewPager2 Overscroll 动画 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:28.843000             🧑  作者: Mango

代码示例1
viewpager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {

    @Override
    public void onPageSelected(int position) {
       super.onPageSelected(position);
       View child = viewPager2.getChildAt(0);
       if (child instanceof RecyclerView)
          child.setOverScrollMode(View.OVER_SCROLL_NEVER);
    }
}