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

python - Setting ctypes.Structure default values -

java - why am i getting a "cannot resolve method" error on getApplication? -

C# Apple Bonjour - how to monitor service records within Windows -