Today I started porting an app to Android L preview in order to have it almost ready when the final product launches. One problem I found is that I can't have an indeterminate progressbar on the ActionBar. It doesn't show at all and throws this error on logcat:
E/PhoneWindow﹕ Circular progress bar not located in current window decor
I'm using this code, which works in <4.4:
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setProgressBarIndeterminateVisibility(true);
Is there any way to get it working again in Android L or should I use an external ProgressBar?
I've just found this question and checked the bug report.
It seems that the dev team had concluded that the issue won't be fixed.
That is:
intended as the progress bar features are not supported on Material action bars.
The "Material action bar" should mean 4.4 (API19) or later's action bar.
Is it possible to permanently hide Navigation/Status Bar under Android 4.2.2
This solution seems not working under Jelly Bean.
I have GalaxyTab 3 (10.1) and hidding of Status Bar has no effect.
It's hidden on application Start on every screens, but i can expand it.
Problem occurs also after rooting device.
Somebody has faced it before (there is also video how to fix it):
forum.xda-developers.com/showthread.php?p=37466852
So my question is:
Is there any way to do this on application level?
Chris Banes and Roman Nurik have develop this usefull tool to controls the System UI easily
https://gist.github.com/chrisbanes/73de18faffca571f7292
No, it seems like there is no way to do this for your entire application on tablets running 4.+. Also, fully disabling it so it never appears is NOT possible.
However, the solution you linked does sort of work for Android 4.2.2, (tested on Nexus S and 10 inch tablet on emulator) but even when it works it reloads the status bar if certain user interactions occur to allow navigation (for example, pressing the menu button on a phone). So this means you should plan on spamming the flag every now and then.
I personally tried with this code in my oncreate:
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
// Remember that you should never show the action bar if the
// status bar is hidden, so hide that too if necessary.
ActionBar actionBar = getActionBar();
actionBar.hide();
Which resulted in:
With the 4.2.2 phone the actionBar below also disappears, this does not seem to be possible for tablets.
Coming from the Android documentation about hiding the status bar, it seems that on Android 4.0 or lower, you would be able to set the fullscreen flag for the entire application and be done with it, but this has been changed to the piece of code above.
Next, the UI documentation has this to say:
The SYSTEM_UI_FLAG_LOW_PROFILE flag replaces the STATUS_BAR_HIDDEN flag. When set, this flag enables “low profile" mode for the system bar or navigation bar. Navigation buttons dim and other elements in the system bar also hide. Enabling this is useful for creating more immersive games without distraction for the system navigation buttons.
So I guess it could be that the galaxy tab 3 requires some playing around with these kinds of flags and does not support actually hiding the status bar but rather prefers making it "less visible" ...
Finally, the setSystemUiVisibility method has some great examples if you're still interested in making sure the status bar stays hidden throughout your application.
Please note, that the status bar and the navigation bar are two completely different things. The navigation bar contains the back, home, and recent apps buttons, while the status bar contains the notifications, clock, battery, etc... The status bar can be easyly hidden with flags like SYSTEM_UI_FLAG_FULLSCREEN, but more convenient, using this as your app base theme:
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
In tablets, the navigation bar often consists the status bar, so if the navbar is visible, the status bar will be too. You can't just hide the status bar, because then you would have to hide the nav bar too.
The purpose of you can't hide the navigation bar forever, is that the user must be able to control his device and navigate as he wants to.
You can't hide the navigation bar before 4.0, and as in the developer guide says, you can hide the nav bar with the SYSTEM_UI_FLAG_HIDE_NAVIGATION flag, however, it won't stay hidden once the user touches the tablet. More explanation here: Android Developers - Hiding the Navigation Bar
In 4.4 KitKat, a new API was introduced, the immersive mode, with that you can hide the navigation bar and still make the user to be able to interact with your app, without the navigation bar revealing itself. The user can swipe down from the bottom of his screen to make it visible again, this clears the SYSTEM_UI_FLAG_IMMERSIVE flag. If you want to make the navigation bar disappear when the user doesn't interact with it, then you can use the SYSTEM_UI_FLAG_IMMERSIVE_STICKY flag, so it will disappear if the user finishes with it. More explanation here: Android Developers - Android 4.4 API
Also immersive tutorial: Android Developers - Using Immersive Full-Screen Mode
Also, make sure you are targetting the API 19, and only use this flag, when your app runs on API 19 or later. More on checking API version: Here (StackOverflow)
Hiding the Status Bar under Android 4.2.2 (SDK 17)
This solution worked for me.
getWindow().getDecorView().setSystemUiVisibility(8);
try this..its working for me..
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,windowManager.LayoutParams.FLAG_FULLSCREEN);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.about_app_phone);
}
I’m using a HTC One (engineering sample) Android phone running Android 4.x
In any app made with Xamarin I see the action bar (red square) at the bottom of the screen. Even when having my own action bar (picture right), the bottom action bar is there. In this case, both action bars can be clicked (settings).
Some 3rd party apps have the same action bar problem, others (FaceBook etc.) don’t.
How can I get rid of this bottom action bar?
The sample you see here is the Xamarin ActionBarSherlock sample.
How can I get rid of this bottom action bar?
Set your android:targetSdkVersion to 14 or higher. What you are seeing is the "legacy menu button of shame".
I have a bit more on this topic in this year-old blog post.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Hiding Title in a Fullscreen mode?
I am making a app that need to be in full screen. i want the notification bar to show, but not a titlebar or icon (my build target is 4.0.3). I have tried to put it in full screen but it stays the same.
Is there any alternative to get full screen app layout / view?
Any help would be greatly appreciated!
i want to hide the hello android text and icon
here is a example:
In the Manifest file, under each activity tab you want to be without a title bar, place:
android:theme="#android:style/Theme.NoTitleBar"
If you wanted no notification bar as well, then use:
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Find out if ActionBar is stacked
Is there any qualifier or method how to detect, if stacked action bar is used? Or do you know the rules, when the stacked action bar is used (e.g. specific screen size)?
Stacked action bar is described on figures 9 and 10:
http://developer.android.com/guide/topics/ui/actionbar.html#Tabs
There isn't a specific method (e.g ActionBar.isStacked()), but you can make a reasonable guess based on some simple rules. Stacked bars are added on narrow devices (in practice this is typically phones in portrait mode). The menu items, icon and Title go on the top bar, and tabs go on the stacked bar. As it mentions in the guide you linked, if you remove the menu items, icon, and title, the top bar will disappear, leaving only the stacked bar. So if you want only one bar, that would be one workable strategy.
All that said, if you're just trying to use the overlay mode of the ActionBar and need to know how far down to put your content so that the bar doesn't hide it, getHeight() will return the height for the full bar (so both bars if stacked is in effect).