On Monday, September 24, 2012 1:22:40 PM UTC-7, Mark Murphy (a Commons Guy) 
wrote:
>
> On Mon, Sep 24, 2012 at 4:12 PM, UgglyNoodle 
> <[email protected]<javascript:>> 
> wrote: 
> > First, it would be nice to know whether I'm correct and these are in 
> fact 
> > bugs, or whether I'm doing something wrong. 
>
> Have you tried returning POSITION_UNCHANGED for A instead of 0? I 
> doubt that it will help, but it is more in line with what the 
> documentation calls for.
>

>From the source code, the behaviour is identical whether (newPos == 
PagerAdapter.POSITION_UNCHANGED) or (newPost == ii.position), so I think 
that the two approaches are equivalent. (Also, I just tested it, to be 
sure, and there was no change in behaviour.)

> If they are bugs, can anyone 
> > suggest a workaround (other than debugging and rebuilding the support 
> > library myself)? 
>
> Fork FragmentStatePagerAdapter, putting the fork in your project in 
> your own package, and modify to suit.
>

Thanks, I may end up using this approach. I'm just surprised that nobody 
has used getItemPosition(Object object) successfully before!

-- 
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