ForceOverflow Theme on SherlockFragmentActivity with multiple Sherlock(List)Fragments does not work correctly #570

lemval opened this Issue Aug 8, 2012 · 7 comments


None yet
2 participants

lemval commented Aug 8, 2012

Created a SherlockFragmentActivity with two SherlockListFragments (or one normal and one list; don't know if that's relevant). Both fragments have a menu and the overflow theme is used.

When directly navigating to the second fragment (by hand after the application has started) and clicking on the menu button (2.3 device) or clicking on the overflow icon (also 2.3 device) the menu does not show. When moving back to the first fragment, the menu shows there! After cancelling this, the menu works correctly on both fragments.
It does not matter if the menu is opened and closed on the initial shown fragment. The problem still exists when navigating to the second fragment. However, it does work correctly if you navigate to the second fragment, navigate back to the initial shown fragment, use the menu there, navigate to the second fragment and use the menu. It seems the fragment in error should be shown first, than a menu on the initial fragment. After this, it's ok.

The icons on the bar are displayed correctly all the time. It is always on the fragment not initially shown the menu does not work the first time.

Using v 90 (4.1.0). SDK min=7, target=11.

lemval commented Aug 15, 2012

Apparently it is also the case when using the default Theme without overflow. Clicking an icon in the bar on the second screen in the above scenario does not activate the menu item. Workaround as above.

I'll try to strip down until I have a bare app showing this behavior (and share the code).

lemval commented Aug 20, 2012

Ok. I have a very bare project now. With APK. Shows on a Samsung Galaxy S (i9100) using 2.3.6. ABS version 90, VPI version 50.

Project sent via gmail.
No problems on a HTC One 4.0.3.
No difference between support lib v13 and v4.

It seems that android.view.View$PerformClick does not occur before the swipe back/menu button has been pressed.
The view in question is an android.widget.ImageButton, supplied to the ActionMenuItemView:onClick method.
InputReader reports dispatchTouch::touch event's action is 0 (followed by 1). So there is some kind of event triggered.

SimonVT closed this Jan 6, 2013

lemval commented Jan 22, 2013

Why close this issue?
I tried the newest version and it still has this problem, regardless of the absence of ForceOverflow Theme....


SimonVT commented Jan 22, 2013

It's closed because there is no ForceOverflow theme anymore, which was mentioned as the cause.

lemval commented Jan 22, 2013

True, so I understand your action ;) But unfortunately the second comment mentions it is not only the case in the ForceOverflow. Shall I resend the test project? Or would you like to dismiss it, since it does not occur on 4.x versions of Android? :) Shall I test it for 3.x ?


SimonVT commented Jan 22, 2013

Open an issue, and add a test case to the known-bugs project on the dev branch.

lemval commented Jan 24, 2013

Reopened as #806. Sorry for not adding a test case to the known-bugs project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment