Android: how to hide ActionBar on certain activities

后端 未结 16 1954
遇见更好的自我
遇见更好的自我 2020-11-29 17:58

I\'ve developed a simple demo application with a splash screen a map and some regular screens.

I have an action bar at the top that contains a logo. It all looks fin

16条回答
  •  感情败类
    2020-11-29 18:39

    From here:

    Beginning with Android 3.0 (API level 11), all activities that use the default theme have an ActionBar as an app bar. However, app bar features have gradually been added to the native ActionBar over various Android releases. As a result, the native ActionBar behaves differently depending on what version of the Android system a device may be using. By contrast, the most recent features are added to the support library's version of Toolbar, and they are available on any device that can use the support library.

    So one option is to disable ActionBar completely (in the app manifest.xml file) and then add Toolbar in every page that needs an ActionBar.

    (follow the above link for step-by-step explanation)

提交回复
热议问题