Viewpager PageScrollStateChanged called multiple times

Joske369

I was wondering if it's normal that PageScrollStateChanged, an event of a ViewPager, is called 3 times when swiping the viewpager

Kasun Dissanayake

yes that is the normal behavior. meanings of the arg0 at 3 times as follows.

   1 for begins dragging
   2 is when the pager is automatically settling to the current page
   0 fully stopped/idle.

you can write your code inside " if(arg0==1) " block, if you want to do execute code only if it is scrolling.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Fragments with setHasOptionsMenu in ViewPager get onCreateOptionsMenu called multiple times

From Dev

kReachabilityChangedNotification is called multiple times

From Dev

MouseListener called multiple times

From Dev

MouseListener called multiple times

From Dev

OnDestroy() called multiple times

From Dev

kReachabilityChangedNotification is called multiple times

From Dev

observeValueForKeyPath called multiple times

From Dev

ViewPager calling multiple times -- Android

From Dev

ViewPager calling multiple times -- Android

From Dev

Why is this function called multiple times?

From Dev

Onclick is being called multiple times

From Dev

OnAuthorization being called multiple times

From Dev

Compute method is called multiple times?

From Dev

Why are didBeginContact called multiple times?

From Dev

Getview Called multiple times in android

From Dev

NSURLProtocol canInitWithRequest: called multiple times

From Dev

SKPaymentTransactionStatePurchased called multiple times by error

From Dev

Ajax callback called multiple times

From Dev

Wowza - onHTTPCupertinoStreamingSessionCreate called multiple times

From Dev

focusout getting called multiple times

From Dev

Why is viewDidLayoutSubviews called multiple times?

From Dev

Constructor being called multiple times

From Dev

Ajax callback called multiple times

From Dev

Why are didBeginContact called multiple times?

From Dev

Webservice getting called multiple times

From Dev

EditText TextChangeListener called multiple times

From Dev

Wowza - onHTTPCupertinoStreamingSessionCreate called multiple times

From Dev

Compute method is called multiple times?

From Dev

Onclick is being called multiple times

Related Related

HotTag

Archive