Android ViewPager get the current View

前端 未结 15 2349
天命终不由人
天命终不由人 2020-11-28 06:24

I have a ViewPager, and I\'d like to get the current selected and visible view, not a position.

  1. getChildAt(getCurrentItem) returns wrong Vi
15条回答
  •  清酒与你
    2020-11-28 06:50

    I'm using ViewPagerUtils from FabulousFilter:

    ViewPagerUtils.getCurrentView(ViewPager viewPager)
    

提交回复
热议问题