android - getItem method in viewpager called two times. How to avoid second time calling -


getitem() method called 2 times first time.i know feature of view pager.according requirement, need load 1 page @ time. if know please me.

thanks in advance.

if activity or fragment having viewpager, can implement onpagechangedlistener() on that.

in listener there's 1 method called onpageselected(int position) give position of current page. can use method call getitem() method, executed when page visible.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -