Reputation: 315
I updated to 4.3 today and I saw that fullscreen activities are not working properly, more in details, the top bar is always shown.
I tried to run on the emulator (4.2) and works fine.
Anyone has the same problem?
Upvotes: 0
Views: 1272
Reputation: 3004
In the manifest:
android:theme="@android:style/Theme.Black.NoTitleBar" >
NOTE: Don't you think it's better to use a single line for attaining the desired task, rather than duplicating the a long code again and again in all the activities?!
Upvotes: 1
Reputation: 2062
You can do it by two ways
1) Programatically :
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
public class ActivityName extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// remove title
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
}
}
2) Modifying AndroidManifest.xml
file:
<activity android:name=".ActivityName"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
</activity>
Upvotes: 3