Android Dev: Navigation View vs App Bar

689 views Asked by At

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

There are 1 answers

0
Mavya Soni On BEST ANSWER

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

  1. 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