I must admit I've seen this issue myself. I'd agree with Jake, looks
to be some sort of race condition.
My use case is as follows:
FragmentActivityLoads up with a FragmentPager, TitlePageIndicator and
a single Fragment. The menu shows up.
A async method completes and I add several additional fragments to the
pager. The menu disappears.
If I swipe to the first page, the menu reappears.
If I reorient the screen, the menu appears.
My original fix would be to reassociate the pager with the adapter but
that doesn't seem to work these days.
I have noticed that onPageSelected (associated with the
TitlePageIndicator) isn't fired (even if you programmatically select a
page).
I'll keep investigating.
On Oct 5, 8:08 pm, Jake Wharton <
jakewhar...@gmail.com> wrote:
> No worries. I understand a lot people are using this with internal and
> closed-source projects.
>
> I can't seem reproduce this. The fact that it occurs on the Honeycomb tablet
> points to a problem in either FragmentActivity handling the menus or just
> some odd race-condition with your implementation.
>
> If you can, make a full copy of your project and then gut it in steps
> (ensuring the bug still presents itself after each step) until you can get
> it down to as minimal of a test case as possible that is free of any
> information specific to your app or company. I would really like to make
> sure this isn't a bug in the library itself.
>
> ---
> Jake Whartonhttp://
about.me/jakewharton
>
> On Tue, Oct 4, 2011 at 10:01 AM, Francho Joven <
fran...@pocketwidget.com>wrote:
>
>
>
>
>
>
>
> > more clues: When the options are dissapeared, if I perform a long click on
> > the menu buttom, it appears again (and the soft keyboard) :-/
>
> > 2011/10/4 Francho Joven <
fran...@pocketwidget.com>
>
> >> Another clue?: I'm have just test my app in a Samsung Galaxy Tab (Android
> >> 3.0.1) and the bug is present too.
>
> >> 2011/10/4 Francho Joven <
fran...@pocketwidget.com>
>
> >>> I'm using 3.2.3 library too.
>
> >>> Jake, I'm sorry but I can not share my code with you. I'm trying to
> >>> generate a new proyect with only the related code, but in the new one I
> >>> can't reproduce the bug
>
> >>> I think that is something related with the memory. I have observed that,
> >>> when it
> >>> happens, a log entry like this appears:
>
> >>> 10-04 12:46:17.701: DEBUG/dalvikvm(96): GC_EXPLICIT freed 455K, 50% free
> >>> 8040K/16071K, external 11648K/13696K, paused 285ms
>
> >>> Regards
>
> >>> 2011/10/3 Leon Roberts <
zeetoo....@gmail.com>
>
> >>>> I've seen the problem on 3.2.3 - it's similar to the one you fixed in
> >>>> 3.2.2 and 3.2.3 that I mentioned when there was a bug with just using 2
> >>>> fragments in the view pager - certainly the external visibility of the
> >>>> menuItem on the action bar is the same even though the trigger conditions
> >>>> are very different.
>
> >>>> However it isn't related to the number of items, and it occurs only
> >>>> rarely.. It's annoying and I'd love to get it fixed, but without knowing
> >>>> what conditions trigger it I can't provide much help :(
>
> >>>> Leon.
>
> >>> --
> >>> *Francho Joven*
> >>> Android Developer
> >>> *
> >>> *
> >>> @*.* *francho @ **po**cket**wid**get**.com*
>
> >> --
> >> *Francho Joven*
> >> Android Developer
> >> *
> >> *
> >> @*.* *francho @ **po**cket**wid**get**.com*
>
> > --
> > *Francho Joven*
> > Android Developer
> > *
> > *
> > @*.* *francho @ **po**cket**wid**get**.com*