Reputation: 55
i am trying to hide ActionBar in SplashScreenActivity but i am not able to hide. it always showing.
i tried this: but not worked
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_splash);
or
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
getActionBar().hide();
setContentView(R.layout.activity_splash);
or
this unfortunately stop app
<application
android:name="info.androidhive.awesomewallpapers.app.AppController"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/FreeWallTheme">
<activity
android:name="info.androidhive.awesomewallpapers.SplashActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Upvotes: 1
Views: 135
Reputation: 91
Try this, it worked for me:
getSupportActionBar().hide();
You have to call it in the onCreate method
Upvotes: 0
Reputation: 2023
In you application's manifest file , set the following property in <application>
TAG.
android:theme="@android:style/Theme.NoTitleBar.Fullscreen
Upvotes: 3
Reputation: 3249
Try putting a new theme tag inside activity like below:
<activity
android:name="info.androidhive.awesomewallpapers.SplashActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
Upvotes: 0
Reputation: 2122
Set the following line in your theme:
<item name="windowActionBar">false</item>
Upvotes: 0