5

i m using navigation drawer in old project but i got new project in this project they used navigation view so what is the difference beet been these two. which is the best for good for customize .

androidking
  • 207
  • 5
  • 17

2 Answers2

7

NavigationDrawer is a panel that displays the App’s Navigation option from the left edge of the screen.

Image for NavigationDrawer

and NavigationView is the builtin class/tag through which you tell the drawer what it looks like.

NavigationView consists of two main elements (these are optional):

  1. You have to tell the NavigationView if there is any header layout:

like this have header and menu both

  1. Menu in the NavigationView

If you don't want to use both then you don't need to use it. You can simply put your custom code (XML) inside DrawerLayout.

An easy example will help you to understand all the game.

Mihai Chelaru
  • 7,614
  • 14
  • 45
  • 51
Atif Afridi
  • 133
  • 1
  • 10
1

Navigation View is a widget provided by the android which you can use inside a Drawer. Navigation View makes it very easy to create a navigation menu inside your app.

Refer this for more:

https://developer.android.com/reference/android/support/design/widget/NavigationView.html

Navigation Drawer is nothing but a container where your navigation menu resides. Either you can use NavigationView for creating a highly customizable menu or you can simply use a listview to provide the menu items.

schinj
  • 794
  • 4
  • 19