Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我在 ViewPager 上执行滑动操作时,页面会滑动,但如果我从选项卡执行 viewPager.setCurrentItem(pageNum),它会重置页面但不会滑动。如何以编程方式使页面滑动?
尝试
viewPager.setCurrentItem(item, true);