Android 4.0.3 Hide Notification Bar and Title Bar - android

I want to make my application go fullscreen in any android device. Hide the Title bar and also the notification bar. The application is supposed to run on a 10 inch tablet on Android 4.0.3.
I am using the following code but only the title bar disappears. I want to hide the notification bar also. Can anyone please tell me what I am doing wrong in my code ?
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

try this
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Hope it helps.
Edit:
The SYSTEM_UI_FLAG_HIDE_NAVIGATION is a new flag that requests the
navigation bar hide completely. Be aware that this works only for the
navigation bar used by some handsets (it does not hide the system bar
on tablets). The navigation bar returns to view as soon as the system
receives user input. As such, this mode is useful primarily for video
playback or other cases in which the whole screen is needed but user
input is not required
.

The thing holding the navigation buttons back and home, time, network information etc is referred to as "navigation" bar.
You can not hide it within the given framework, but it is possible if rooting the device is an option for you:
Root device
Install and run Busybox
Install HideBar
In HideBar there is an option to run in 'Kiosk' mode, in which there is no way to re-display the navigation bar. Needless to say, you really need to be careful with this.
This question was also asked here:
Android tablet navigation bar won't hide
How to remove system bars on Android, I mean, all
Android tablet navigation bar won't hide
Is there a way to hide the system/navigation bar in Android ICS
Hide Tablet system bar
Real Fullscreen with Android 4 Tablets
Easy way to hide system bar on Android ICS

Related

Is there a way to disable Android's status bar?

I want to build my own status bar using Tasker. Is it possible to disable the Android status bar completely? I'm currently running Android 7.0 on my Galaxy S6. Before this phone I had a rooted HTC M7 running CyanogenMod and that allowed me to at least hide the status bar, but it still appeared when I swiped down from the top of the screen and also when I had a keyboard open.
I think this will help you to hide status bar
add these lines in onCreate method
requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);

HIDE STATUS BAR ON LOCK SCREEN APP

I am making an android lock screen app.My problem is the status bar .I writed this line on AndroidManifest.xml android:theme="#android:style/Theme.NoTitleBar.Fullscreen" but the users can scroll the status bar and unlock the phone without the app.So how to hide completly the status bar?
Since Android 4.4.2, you can't hide the status bar anymore. What you can do is make it so users are unable to expand it.
The answer to this question should work for you:
Hide status bar in android 4.4+ or kitkat with Fullscreen

Android - Permanently hide navigation bar

I need to hide the navigation bar on a tablet with 4.0 completely. No user interaction should change this behavior. Right now I'm running the default Fullscreen View from Android Studio, but user interaction brings up the navigation bar.
Is there a way to do that without root?
Unless phone is rooted - you cannot override the standard behavior or Android OS.
In fullscreen mode i will be hidden, but can be still brought down when required.
You could set the app like a Launcher, hide the navigation bar, and root the phone, in order to set always run that.
The other option is root the phone, and make your own android version without the navigation bar.

Android: show/hide system bar like Netflix app

I've built a simple video player app for Android 4.2. I'd like to be able to programmatically show/hide the system bar while this app is playing video. I've read many threads here that indicate a device must be rooted in order to hide the system bar.
Then, I noticed that the Netflix app on my un-rooted Android tablet achieves the effect I'm after:
When the Netflix app is first launched, thee system bar is shown.
5 seconds after a video starts playing, the system bar icons slide down and are hidden.
Tapping the screen causes the system bar icons to slide back into view.
5 seconds later, the system bar icons slide out of view again.
How might I achieve this effect?
You're looking for setSystemUiVisibility() (See Documentation).
Specifically the SYSTEM_UI_* flags. In KitKat, they've added additional flags for immersive mode.

Hide Android status bar on the homescreen

I'm looking for a way to hide the status bar that is displayed on the homescreen of the device, when not in any applications.
Does anyone know of a way to do this?
On Android 1.x and 2.x, you can write your own home screen.
On Android 3.x, this is impossible.
In all versions, you cannot remove the status bar from another application.

Categories

Resources