2

I am currently expanding the use of the action bar in one of my applications by looking at and implementing the action mode ability via ActionBarSherlock 4.0.1 and the support Library .

I have achieved this by implementing the 'ActionMode.Callback' on a class as par the ActionBarSherlock example (ActionModes.java). As par the example, I am starting the action mode by using 'startActionMode(new ModeCallback());' and finishing it with 'actionMode.finish();'. The only difference I have is that I am doing all this in a SherlockFragment and not SherlockActivity.

Currently the functionality works just fine, however, as the following images will show, I am getting graphical issues with the ActionBar tabs when they are on a separate row with some android versions and not others.

Android 2.1 - Issue

Portrait - bad:

enter image description here

Landscape - ok

enter image description here

Android 2.2 - No Issue

Portrait - ok

enter image description here

Landscape - ok

enter image description here

Android 2.3.3 - Issue

Portrait - bad

enter image description here

Landscape - ok

enter image description here

Android 4.0 - No Issue

Portrait - ok

enter image description here

Landscape - ok

enter image description here

Apologies for the obvious image adjustment but I have had to cover up some IP. As can be seen from the screen shots of ones with issues and ones without, the tab row is getting 'whited out' when going into the action mode.

The screen shots for Android 2.2, 2.3.3 and 4.0 have been taken from the emulator with 2.1 being taken from my own phone. I can therefore rule out emulator issues. The problem also is present on a phone running Android 2.3.5.

I have also run the application in BlueStack for Windows. Incase you have not heard about it go to http://bluestacks.com/. In essence it allows the running of Android apps in a Windows Environment (Yep, a fancy emulator!). On this the issue is not present.

Any help will be appreciated as the fact it is happening on some versions and not others completely baffles me.

4

0 回答 0