Dear all,

    I am having trouble with ViewPager overscrolling to the next or 
previous page if ViewPager's width is changed in onPageSelected.

I'm looking at ViewPager's setCurrentItemInternal code and the steps of 
swiping to the next page seems to be 1. smoothScrollTo 2. calls 
onPageSelected 3. completeScroll 4. scrollTo

it seems like changing the width of ViewPager during the scroll operation 
(step 2) is not by the designer of Viewpager's intention.

The reason why I need to change Viewpager's width when swiping to a 
different page is that for example, we have pages A, B, C A might not have 
a footer bar on its right, but B has it, so when I swipe from A to B, 
footer bar will pop out from right. therefore changing the width of 
ViewPager.

I tried postDelay the time to show footer and it worked perfectly, but i 
don't think this is a good solution.

Anyone knows how I should go about to solve this problem? Where should I 
move the show footer bar code to?

thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to