I want to display a completely different actionbar that is within a navigation drawer. Here is an example from the app Flow:
you can see that on the right is the app with a different actionbar than that of the navigation drawer's. How could something like this be replicated?
Related
I'm wondering if I should combine the material design Bottom Navigation and the Navigation Drawer.
As is understand there is always one item active in the Bottom Navigation Bar, but what if I choose to navigate to a page using the Navigation Drawer menu? How do I preserve navigation consistency.? The Bottom Navigation item will still be active even if I navigated to a different activity/fragment.
I was thinking about setting all Bottom Navigation items to inactive in case a user navigates using the Navigation Drawer.
Unfortunately, the lib I'm using (https://github.com/pocheshire/BottomNavigationBar) doesn't support this.
How does the Bottom Nav Bar coexist with the Navigation Drawer? What am I missing here?
Looking at the design guidelines, it's pretty clear that the navigation drawer is at a higher z-level (hence higher hierarchy). Think of bottom navigation as essentially a replacement for tab layouts. You can look at the Google Photos application as an example.
Is it possible to combine both the navigation drawer and bottom navigation bar at same activity in android? I am able to use them on separate activities but am facing difficulties while combining them in a single activity.
I have an activity that extends fragmentActivity that has a navigation Drawer, and three different fragments.
Is there a way to make a navigation Drawer that has different buttons inside each of my fragments?
For example when you enter fragment 1 you will see certain buttons in the navigation Drawer, and when you go to fragment 2 you will see different buttons in the navigation Drawer.
You should just define which options are to be displayed in the NavigationDrawer depending on which current Fragment you're on, using a switch statement or if statement.
Check out this link:
How to change fragments using Android navigation drawer
Also, from this link https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.html
As per the Android Design guide, any drawers positioned to the
left/start should always contain content for navigating around the
application, whereas any drawers positioned to the right/end should
always contain actions to take on the current content. This preserves
the same navigation left, actions right structure present in the
Action Bar and elsewhere.
So this type of thing seems like it was planned for when the NavigationDrawer was designed.
Does anyone successfully implemented Navigation Drawer with Fragments, Up Navigation and ActionBar?
As stated in documentation Up Navigation works automatically with Activities. But If I want to implement Navigation Drawer, then I have to use fragments.
I have set:
ActionBar actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeButtonEnabled(true);
I also put all fragments to BackStack. When checking listener OnBackStackChangeListener, I see that BackStack is being checked, but the Up navigation arrow doesn't show up.
Navigation Drawer with Fragments
take a look at this question and this may also help you. As stated in the second link, you don't "have to use Fragments to use the NavigationDrawer"
Although many navigation drawer examples show how fragments can be
used with the navigation drawer, you can also use a
RelativeLayout/LinearLayout if you wish to use the drawer as an
overlay to your currently displayed Activity.
This is actually the approach I've used in one of my recent projects and it works fine.
I'm currently working on an Android application with two ActionBar Tabs.
I have three questions:
1) How can I make the ActionBar Tabs to appear on the bottom of the app (under the fragments)
2) Can I make a WebView in a Navigation drawer (menu)
3) How can I let the ActionBar menu appear on the right side of the ActionBar?
Thanks for answering
EDIT:
With an ActionBar menu, I'm meaning the menu on the middle of this Picture:
http://static.androidnext.de/Facebook-for-Android.jpg
How can I make the ActionBar Tabs to appear on the bottom of the app (under the fragments)
Sorry, that is not possible with action bar tabs. You cannot even control if they show up as tabs at all, let alone their position.
Can I make a WebView in an ActionBar Menu (the menu for example Facebook has the main Navigation)
What you are referring to is a navigation drawer. Putting a WebView in a navigation drawer is technically possible but is unlikely to meet Google's design guidelines for navigation. In your case, given your third question, you presumably are not using this for navigation.
How can I let the ActionBar menu appear on the right side of the ActionBar?
That depends on what you are using for the navigation drawer. DrawerLayout supports this:
Drawer positioning and layout is controlled using the android:layout_gravity attribute on child views corresponding to which side of the view you want the drawer to emerge from: left or right. (Or start/end on platform versions that support layout direction.)