Questions tagged [android-navigationview]

One of the features of Android Design Support Library which is bringing a number of important material design components to all developers and to all Android 2.1 or higher devices. Navigation Drawer enables your app having easy UX to navigate, particularly for first time users. NavigationView provides the framework for developers easier to establish Navigation Drawer UI.

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.

430 questions
89
votes
2 answers

NavigationView and custom Layout

I'm using the Designs Support Libraries NavigationView like this:
83
votes
17 answers

In android how to set navigation drawer header image and name programmatically in class file?

In android studio 1.4.1, I have created new Navigation Drawer Project which is default.My issue is in this project there is nav_header_main.xml file which is for navigation header image and name. I want this image and name should be set…
44
votes
6 answers

How can I change separator color in NavigationView?

I'm trying to use NavigationView to implement NavigationDrawer. I have added the separator by setting group id in menu. However I can't see the separator. I guess it is because the separator color is same as the background. So I want to change the…
38
votes
6 answers

How to add custom views in the new NavigationView

I'm trying to add a switch as menuitem in NavigationView like this I used the the actionViewClass attribute but it only shows the title.
atabouraya
  • 3,233
  • 1
  • 26
  • 31
34
votes
12 answers

How to uncheck checked items in Navigation View?

I know it's possible to highlight a navigation view item by calling setCheckedItem() or return true value in onNavigationItemSelected to display the item as the selected item, but How can I uncheck the checked items of a navigation view?
Hafez Divandari
  • 8,381
  • 4
  • 46
  • 63
32
votes
1 answer

Disable icon colorStateList in NavigationView

In my app today I have icons which doesn't just have a single color, but in some cases two colors depending on the data state in my app. This means I can't use the default tinting behavior in NavigationView. It looks like with the new…
31
votes
5 answers

How I can remove the unnecessary top padding of the Navigation view?

There's an unnecessary top padding between the header and the first item shown in this picture. How it can be removed? you can find the source code here: https://github.com/chrisbanes/cheesesquare
29
votes
5 answers

Android support v23.1.0 update breaks NavigationView get/find header

I have been using the v23.0.1 support library until now with no problems. Now when I switch to the new v23.1.0 library I am getting a null pointer on widgets in the drawer layout. mNavigationView = (NavigationView)…
25
votes
1 answer

Add badge counter to hamburger navigation menu icon in Android

My question is the same as this question (which is not a duplicate of this question). The only answer to that question does not work for me as, rather than changing the default hamburger icon to the left of the activity's title, it just adds an…
23
votes
6 answers

Navigation Drawer Menu Item Title Color in Android

I have a problem changing the Menu Item Title Color in the Navigation Drawer I set the itemTextColor but it only changes the Color of the Items not the Title of the menu. Here is my Activity_main.xml
22
votes
4 answers

Side Navigation Drawer Item click not working

PLEASE READ FIRST BEFORE ANYONE MARK IT AS DUPLICATE QUESTION BECAUSE IT IS NOT. I have used Navigation Drawer, Bottom Navigation bar and a custom Action bar. Bottom navigation bar and action bar are working fine. navigation drawer also shows menu…
22
votes
4 answers

NavigationView: how to insert divider without subgroup?

How I can put a divider without title Subgroup in the new NavigationView?
21
votes
6 answers

onNavigationItemSelected not getting called

I have implemented a navigationview in my app , which was automatically created by AndroidStudio. I picked up the NavigationDrawer Activity when I created a new project and the menu items seem ok , but nothing happend when I click on any of the menu…
Nick Su
  • 673
  • 1
  • 7
  • 11
20
votes
6 answers

Android NavigationView: reduce space between icon and text and `itemBackground` not working

Is there a way to reduce the space between the icon and text in the NavigationView when its built using a menu xml? I've tried to text android:drawablePadding using the app:itemTextAppearance attribute and that doesn't work, I've tried setting the…
Ali
  • 12,354
  • 9
  • 54
  • 83
1
2 3
28 29