Your Galaxy Tab is running Honeycomb or higher, which means that the old Options Menu has been deprecated in favor of Action Bar. That having been said, there's still a menu icon in the title bar (a square with a slash through it in Honeycomb and three square dots in Jelly Bean). If your user clicks that, they get your standard options menu (without menu item icons, however).
The alternative is to run ActionBar Sherlock to give your apps action bars, regardless of OS version.
If you insist on doing your own branching based on OS version, try this:
int sdk = android.os.Build.VERSION.SDK_INT;
if(sdk < android.os.Build.VERSION_CODES.HONEYCOMB)
{
// Gingerbread and earlier
}
else
{
// Honeycomb and later
}
.
stackoverflow.comm
No comments:
Post a Comment