Android theme, fullscreen and the action bar

前端 未结 1 874
谎友^
谎友^ 2020-12-20 02:41

I have have some problems with devices that have the action bar. When running on a phone I want to go fullscreen with no title bar and no status bar. On tablets I want to sh

相关标签:
1条回答
  • 2020-12-20 02:59

    On tablets I want to show the action bar but still no title bar

    The action bar replaces the title bar. There is no concept of an activity having an action bar and a title bar.

    Is there a way to show the action bar in fullscreen mode?

    AFAIK, no, by definition.

    The support library doesn't support the Action bar.

    ActionBarSherlock provides a backport of the action bar for API Level 7 and higher.

    The easy solution for this according to the docs is to add android:showAsAction="ifRoom" to the menu items. But that does absolutly nothing.

    It certainly "does nothing" if you have no action bar. If you want a fullscreen experience, then you will need to roll your own menu replacement. IMHO, most fullscreen apps did this already (e.g., a game going with a game-styled "menu").

    0 讨论(0)
提交回复
热议问题