user6530833
user6530833

Reputation:

view pager set current item does not work properly

I use AHBottomNavigationViewPager.

When i set AHBottomNavigationViewPager current item, two fragments open.

For example: when i set 0 for current item, fagments with position 0 and 1 open and their codes will run.

What is problem?

Thanks.

Upvotes: 2

Views: 295

Answers (1)

Yogesh Rathi
Yogesh Rathi

Reputation: 6499

View pager load side by side fragment. If you set 0 position then fragment 0 and 1 will load, If you set 1 then load 0 ,1 and 2 position fragment. If you set 2 set load 1,2 and 3 position fragment.

More details https://developer.android.com/reference/android/support/v4/view/ViewPager.html

Upvotes: 1

Related Questions