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
18
votes
4 answers

How to navigate to a new view from navigationBar button click in SwiftUI

Learning to SwiftUI. Trying to navigate to a new view from navigation bar buttton clicked. The sample code below: var body: some View { NavigationView { List(0...< 5) { item in NavigationLink(destination: EventDetails()){ …
Unikorn
  • 1,140
  • 1
  • 13
  • 27
18
votes
2 answers

Positioning of actionLayout in navigation drawer

I have the following setup:
injecteer
  • 20,038
  • 4
  • 45
  • 89
18
votes
3 answers

NavigationView OnNavigationItemSelectedListener not being called

I am trying to use NavigationView from Android Support Design library in my app. For some reason, OnNavigationItemSelected listener is not being called. Here is my code Activity Layout
NinjaCoder
  • 2,381
  • 3
  • 24
  • 46
17
votes
2 answers

SwiftUI Navigation Multiple back button

When I push more than one view, multiple back buttons are visible in the navigation bar. struct ContentView: View { var body: some View { NavigationView { NavigationLink(destination:SecView()) { …
Stefano Toppi
  • 626
  • 10
  • 28
16
votes
6 answers

Change Navigation View Item Color Dynamically Android

I'd like to build a navigation drawer where each item has a different selection color (the icon tint and text color) as the google play store has: I'm not sure how they've solved this, I think they use different activities with different drawers. I…
vigonotion
  • 1,164
  • 2
  • 10
  • 21
16
votes
2 answers
15
votes
3 answers

NavigationView title doesn't appear when the views are in TabView in SwiftUI

I have two Views and each of them contains NavigationView with title. I have created a TabBar View which also has a NavigationView on it. struct TabbarView: View { var body: some View { NavigationView{ TabView { MainContentView() …
Osama Naeem
  • 1,830
  • 5
  • 16
  • 34
13
votes
5 answers

Adding Segmented Style Picker to SwiftUI's NavigationView

The question is as simple as in the title. I am trying to put a Picker which has the style of SegmentedPickerStyle to NavigationBar in SwiftUI. It is just like the native Phone application's history page. The image is below I have looked for Google…
Faruk
  • 2,269
  • 31
  • 42
13
votes
3 answers

setNavigationItemSelectedListener Not Working

My NavigationView onClick event is not working. Here are the code snippets I tried one by one, but nothing worked: Implementing NavigationView.OnNavigationItemSelectedListener using OnClick() Method Setting NavigationItemSelectedListener method nav…
Rohit Chauhan
  • 1,119
  • 1
  • 12
  • 30
12
votes
5 answers

SwiftUI changing navigation bar background color for inline navigationBarTitleDisplayMode

I just started coding in SwiftUI and came across a problem. I need to give different colors to the background of the navigation bar (NavigationView). The colors will change as I go from one view to the next. I need to have this working for…
Tomas
  • 153
  • 1
  • 1
  • 12
12
votes
1 answer

What might be causing this animation bug with SwiftUI and NavigationView?

I've been experimenting with some SwiftUI layouts and one of the things that I wanted to try out was creating a simple circular progress ring. After playing around with the code for a while I managed to get everything working the way I was hoping…
pmostoff
  • 123
  • 1
  • 6
12
votes
3 answers

Draw NavigationView header below status bar with NavigationView behind status bar

I have been trying to draw the NavigationView header below the status bar, but it stays behind the status bar. I have already set the property android:fitsSystemWindows="true" for both my DrawerLayout as well as my NavigationView, but to no…
12
votes
4 answers

Unable to import android.support.design.widget.NavigationView

I want to have navigation drawer in my application so I am following a tutorial here, in which he has imported the NavigationView library within his project. When I import that library, an error pops up: 'can not resolve'. So again when I hover…
Dushyant Suthar
  • 673
  • 2
  • 9
  • 27
12
votes
3 answers

How to set Tint in NavigationView to some icons

I want to keep some icons not tinted, and some tinted. Now I have: app:itemIconTint="@color/menu_icons_selector" It tints all icons. I'm trying to make all icons not tinted mNavigationView.setItemIconTintList(null); and…
diesersamat
  • 667
  • 2
  • 7
  • 18
12
votes
6 answers

How to get MenuItem position in the listener using the new NavigationView

The topic says it all. How should I go about retrieving the item position on the onClick listener using NavigationView? Also, why is there no getHeader method? Lastly I am doing everything programmatically, but the header is still clickable. Any…
Fhl
  • 1,079
  • 1
  • 12
  • 26
1 2
3
51 52