ActionBarSherlock icon indicating copy to clipboard operation
ActionBarSherlock copied to clipboard

Action items from fragments in a pager are incorrectly displayed in split mode

Open blork opened this issue 13 years ago • 1 comments

When swiping between fragments (which have an options menu) in a pager, the action items exhibit strange behaviour when in the action bar is in split mode. Icons appear to overlay, text disappears, and the items become unclickable. If the fragments are switched by clicking a tab (i.e. not swiping), then they work fine.

This behaviour can be seen in the fragment demo app included with the library. Change the manifest like so:

<activity
        android:name=".FragmentTabsPager"
        android:label="@string/fragment_tabs_pager"
        android:uiOptions="splitActionBarWhenNarrow" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE" />
        </intent-filter>
</activity>

adding 'android:uiOptions="splitActionBarWhenNarrow"'. Then start this activity (Tabs and Pager).

Screenshots:

Invisible text on items

More images.

blork avatar May 13 '12 01:05 blork

This is some kind of race condition which is introduced by using the ViewPager which is almost certainly a duplicate of #351. You'll notice that if you give the same treatment to the regular "Tabs" example (.FragmentTabs) this bug is not present.

Also see: http://b.android.com/29472

JakeWharton avatar May 14 '12 03:05 JakeWharton