Navigationbar not showing upon the custom action bar what should i do in android
(https://i.stack.imgur.com/MDRCw.png)
Related
My app is set to be fullscreen and immersive mode so the Status bar and Navigation bar are hidden. I wrote a custom spinner to be able to prevent the navigation bar from appearing when the spinner is clicked. This actually works but the main Activity view still gets resized as if the navigation and status bar has shown. The area where they would normally be displayed is just white. It will stay like this until I click something in the spinner or cancel by clicking outside of the spinner. Is there something I can call on the main view to refresh it's layout to remove the white space or prevent it entirely?
When the Activity is loaded I call my hideSystemUI method:
private void hideSystemUI() {
View decorView = getWindow().getDecorView();
decorView.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
Custom spinner onClickListener resets the view back to the original UI layout. So I do not see the actual navigation bars or status bars, just the white space they would have occupied.
Any ideas?
Thanks!
I try to put the bottom navigation bar under Google Map and I can't. When I tap the second button of navigation bar I want to open google map fragment but the bar stays at the bottom. Does anyone know how it can be done?
Here is an example of exactly what I want:
My app uses a bottom navigation layout and loads up three fragments (on one of them is a google map fragment), hence the bottom navigation menu stays there for all the three fragment of the app!
If you want to have a screen where the bottom navigation isn't present, why not use an activity with a layout without a bottom navigation view for that screen ? The user will just navigate back to the previous activity when the job is done.
I'm new to Android development. I get that a NavigationView is an AppBar (i think). What makes these two different? I want to create a custom "appbar/toolbar" with a centered logo and menu/settings button in the top right corner (instead of the standard left) which reveals a drawer.
I was going to ditch the built in appbar/toolbar all together and just create my own somehow and include button overlay which displays a drawer.
What would you do? Navigation view, app bar, or custom toolbar from scratch? I don't know what the standard is or what is acceptable. What is the difference between a navigationview and appbar. Thank you.
edit: I'm slowing realizing that an appbar is one feature within a navigation view, among others like a drawer layout, menu items etc... i think.
1. NavigationView
By using NavigationView, we can bind the menu directly with NavigationView. This is the benefit of the NavigationView. No need to create ListView and adapter with navigation drawer. By default we can get selector of item click. With menu we can change the color of icon of selected menu.
For more details :
1.https://developer.android.com/reference/android/support/design/widget/NavigationView.html
http://www.technotalkative.com/part-4-playing-with-navigationview/
2. AppBar
Appbar is for toolbar with scrolling effect. We can easily give the material design effect.
For more details :
1.https://developer.android.com/reference/android/support/design/widget/AppBarLayout.html
I'm relatively new with Android development, and I received a layout for an app where I have to put some kind of bar with images above the action bar.
I searched a lot in Google but I couldn't find anything about change the action bar position. I also found some info saying:
Google highly recommend to NOT change the action bar position(...)
Well, how I got some custom views for the action bar icons was to put the view below the action bar. However, what I am supposed to do is put the view above the action bar.
Is there a way to put a view above the action bar or change the action bar position?
Is there a way to put a view above the action bar or change the action bar position?
Not that I am aware of.
I have a video view and i am hiding the navigation bar when video starts playing, but the view is stretched to the empty part created after the hiding the navigation bar. I want to play the video in full screen behind the navigation bar. So that when i do hide/show navigation bar the stretching and shrinking of video view should be avoided. Any suggestions are appreciated ...
Thanks.
What is it basicallly your navigation bar is it a Preloader,..?
for preloader
you can dismiss it like
pd.dismiss();
use full screen window with flag SYSTEM_UI_FLAG_HIDE_NAVIGATION :
view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
reference:
http://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_HIDE_NAVIGATION