use*_*117 8

如果要隐藏项目的所有活动中的操作栏,请更改theme您的应用程序AndroidManifest.xml.

1. 在style.xml中添加它

<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.DarkActionBar">
      <item name="windowActionBar">false</item>
      <item name="windowNoTitle">true</item>
      <item name="android:windowFullscreen">true</item>
</style>
Run Code Online (Sandbox Code Playgroud)

并使用AndroidManifest.xml中的样式.

android:theme="@style/AppTheme.NoActionBar" 
Run Code Online (Sandbox Code Playgroud)

2.或简单解决方案..只需用此行替换主题属性..

<application
    .
    .
    android:theme="@android:style/Theme.Holo.Light.NoActionBar"
    . >
Run Code Online (Sandbox Code Playgroud)

如果你想为特定活动隐藏actionBar ......那么

1.Theme活动的 变化..

<activity android:theme="@android:style/Theme.Holo.Light.NoActionBar">
Run Code Online (Sandbox Code Playgroud)

2.以编程方式隐藏actionBar ..

ActionBar actionBar = getActionBar(); or getSupportActionBar();
actionBar.hide();
Run Code Online (Sandbox Code Playgroud)