Questions tagged [navigationview]

Provides navigation drawer access. Part of Android's design support library.

Summary

Helps developers follow Android's material design standards by providing access to the navigation drawer.

Navigation View

The navigation drawer can be an important focal point for identity and navigation within your app and consistency in the design here can make a considerable difference in how easy your app is to navigate, particularly for first time users. NavigationView makes this easier by providing the framework you need for the navigation drawer as well as the ability to inflate your navigation items through a menu resource.

Reference

770 questions
12
votes
4 answers

Cannot resolve symbol 'NavigationView'

I made a NavigationView inside a DrawerLayout in an XML file - but when I try to initialize it in Java I get this error. // DrawerLayout initialises fine DrawerLayout drawerLayout = (DrawerLayout) findViewById(R.id.nav_drawer); // Cannot resolve…
HarryBalls
  • 133
  • 1
  • 1
  • 8
11
votes
2 answers

NavigationView SwiftUI shows split view in iPad

With NavigationView being the root of UIHostingController , the below code shows split view for iPad. struct ContentView: View { var body: some View { NavigationView { Text("Hello") …
NNikN
  • 3,720
  • 6
  • 44
  • 86
11
votes
5 answers

Add one section separator for Navigation Drawer in Android

I have a navigation drawer like this image. I want to add a section separator . It seems simple but I can't find anything on the web that was useful for my case. - Add a line separator below Express Add a line separator below My Information …
Tufan
  • 2,789
  • 4
  • 34
  • 52
11
votes
2 answers

How to add footer buttons in NavigationView

I'm following the post "Android design library NavigationView with footer" to add buttons at the bottom of NavigationView. The problem is that only the last NavigationView appears and it's occuping the entire screen height. Here is my…
Sandro Simas
  • 1,268
  • 3
  • 21
  • 35
11
votes
3 answers

How can I programmatically open (show in screen) NavigationView

How can I programmatically open (show in screen) NavigationView? I can't find any function what can be helpfull. I have this xml file:
Peter Staranchuk
  • 1,343
  • 3
  • 14
  • 29
11
votes
4 answers

How to change the icons direction for menu items in a NavigationView?

Hi I am using android NavigationView. I want to change the icons direction to RTL instead of LTR like this: How can I do this?
Daniel Mashraki
  • 262
  • 3
  • 11
11
votes
2 answers

How to give custom text colour for a single menu item in a NavigationView?

Hi I am using android NavigationView. I want to give seperate text colour for some items in the NavigationView, not for all items. OR I want to change the text colour for a single item dynamically when I select an item in the NavigationView(Only for…
Sudheesh Mohan
  • 2,560
  • 3
  • 21
  • 38
11
votes
4 answers

Dynamic Menus in NavigationView

I have this Layout:
Dimmy Magalhães
  • 357
  • 1
  • 6
  • 21
10
votes
4 answers

SwiftUI NavigationView extra space at bottom of screen

I am new to Swift and I'm trying to create a simple screen with the NavigationView in SwiftUI. For some reason it is adding extra space at the bottom when I wrap anything inside of the NavigationView. I wanted to see if anyone else is running into…
JakeRuth
  • 191
  • 1
  • 6
10
votes
2 answers

Default Navigation Drawer View to ExpandableListView

In Android Studio 2.1.2, if i create a default navigation activity I get this view: Which uses the following activity_main.xml file:
10
votes
2 answers

How to inflate android NavigationView with another menu dynamically during onClick?

Hi I have a NavigationView and there is an imageview in the headerview of that NavigationView. When I click on the imageview , NavigationView should inflate another menu resource file and replace current menu like in PlayStore app. I've tried…
Sudheesh Mohan
  • 2,560
  • 3
  • 21
  • 38
9
votes
2 answers

NavigationView Pane background

How can I change the NavigationView Pane background?? I'm trying this way:
Roberto Pinheiro
  • 1,260
  • 13
  • 30
9
votes
2 answers

NavigationView is not visible but item click is working

I want to setup navigation drawer using NavigationView. Items are not visible but when we click on the empty area, particular item click code is getting executed. It looks items are invisible but clickable. I've tried to play with background colour…
moDev
  • 5,248
  • 4
  • 33
  • 63
9
votes
3 answers

Refresh NavigationView menu after change locale

I'm changing locale programmatically from fragment and everything ok. There is one exception, the NavigationView menu, where language didn't changing. How to refresh it without recreate all activity. Mainactivity code @Override protected void…
koa73
  • 861
  • 2
  • 10
  • 27
9
votes
2 answers

NavigationView: custom item layout with app:actionLayout how to?

according to recent Ian Lake post And if you haven't looked at NavigationView recently, it actually got quite an update in version 23.1.0 [1] with the addition of app:actionLayout support for custom view support. How can I use app:actionLayout…
Rino
  • 733
  • 8
  • 19