1

I have a non-market app that was built to run on a specific device. Originally, this was on a device running 2.2, but now the app is targeting a specific device on 3.1 and I am adding in support for the Action Bar.

One of the apps Activities is required to be full-screen and have hidden the status bar and the Action Bar. This is achieved using the following in the manifest:

<activity 
    android:name=".activity.EditorActivity"
    android:label="@string/activity_edit"
    android:theme="@style/Canvas">

Which references this style:

<style name="Canvas" parent="@android:style/Theme.NoTitleBar.Fullscreen">
    <item name="android:windowBackground">@color/bg_white</item>
</style>

So, after moving to 3.1, the effect works, in that the Activity is fullscreen, and everything is hidden as needed, but this of course hides the options menu from populating the Action Bar.

I know that if I leave the android:targetSdkVersion="8", the options menu is shown in the bottom navigation, but this seems like a bit of a hack - is there any other way or 'best practice' for this? I basically have to set android:targetSdkVersion="12" to ensure the app works and isn't put onto older devices so this won't be a permanent solution.

Unpossible
  • 10,607
  • 22
  • 75
  • 113

1 Answers1

1

I've decided to stop trying to swim upstream and have switched to using a translucent Action Bar that is overlaid - it works perfectly and is exactly what I had been doing prior to 3.x with my custom solution.

Custom Translucent Android ActionBar

Community
  • 1
  • 1
Unpossible
  • 10,607
  • 22
  • 75
  • 113