I’m trying to update my old Android app to work correctly on Android 4.0.
By “work correctly” I mean two things:
– enable hardware acceleration because Android 4.0 devices support it
– have a backwards compatible options menu because my app uses it
In my AndroidManifest.xml I have minSdkVersion="8" and targetSdkVersion="10". Additionally I have hardwareAccelerated="true".
Here’s my dilemma. Having targetSdkVersion="10" shows the backwards compatible options menu but disables hardware acceleration even if the device supports it. And having targetSdkVersion="14" enables hardware acceleration but removes the backwards compatible options menu.
Some people have asked me to just get rid of the backwards compatible options menu and use the ActionBar class for Android 4.0.
Are there any other solutions?
Hardware acceleration is only supported from Honeycomb API 11 – http://developer.android.com/guide/topics/graphics/hardware-accel.html
I think you should to set your target SDK to 11.
Secondly, this new post on the Android developer blog outlines the options for backwards compatibility with the menu button.
http://android-developers.blogspot.com/2012/01/say-goodbye-to-menu-button.html
The point that helps you is