Questions tagged [android-navigation]

For questions about navigation within and between Android apps. Examples include navigating between activities/fragments, up/back behavior, task stacks, and Intent flags that affect navigation behavior.

Consistent navigation is an essential component of the overall user experience. Few things frustrate users more than basic navigation that behaves in inconsistent and unexpected ways.

Android 3.0 introduced significant changes to the global navigation behavior. Thoughtfully following the guidelines for Back and Up will make your app's navigation predictable and reliable for your users.

Android 2.3 and earlier relied upon the system Back button for supporting navigation within an app. With the introduction of action bars in Android 3.0, a second navigation mechanism appeared: the Up button, consisting of the app icon and a left-point caret.

See also the official documentation about this topic.

1192 questions
0
votes
1 answer

Do not understand NavUtils navigation part in Manifest file

i was working with back navigation and i found out some code to work with it. In the manifest file i tried to put my packagename and the class name but it says Activity Main does not have a parent acitivity. Here is my manifest file the package name…
Wang'l Pakhrin
  • 858
  • 3
  • 15
  • 29
0
votes
1 answer

Android navigation button including title like Facebook

How can I make the back navigation button contain the activity title? This is my code, and when I click back, it only clicks in the arrow. I know how to provide back navigation. I would like to know how I can include the title in the button! Toolbar…
0
votes
1 answer

Lock one of two fragments in DrawerLayout

I have two navigation fragments in the DrawerLayout. One navigation fragment in on the left and second is on the right. In some cases I need to open left navigation fragment and lock it. When I had only left navigation fragment I used …
0
votes
0 answers

Right Drawer won't close programatically with double drawer layout

I have two Drawers (left and right) (or start and end) in my drawer layout. Problem is i can't seem to close the right drawer programatically.. i can open or close the left drawer but can only open the right drawer. I am doing a little hack to…
erik
  • 4,946
  • 13
  • 70
  • 120
0
votes
1 answer

Using android activities and fragments the right way

I need some best practices ideas for my app. I think there is too much boilerplate code right now and I don't know if I'm using activities and fragments the right way. There are 3 activities (A,B,C). The app starts at A. I can navigate to B which is…
Aitch
  • 1,617
  • 13
  • 24
0
votes
2 answers

Navigation drawer won't close when item selected

I have a navigation drawer that when an Item is selected, it loads the new fragment but never closes the drawer. My navigation drawer code looks like this: import android.IntentIntegrator; import android.IntentResult; import…
Mike
  • 6,751
  • 23
  • 75
  • 132
0
votes
2 answers

Navigation drawer + ViewPager - fragments do not show

I have a problem with the layout I created. I used the Navigation Drawer as a main navigation pattern. It looks and works as I wanted, but the problem is that after returning to the fragment which holds ViewPager - the inner-fragments are not shown.…
fragon
  • 3,391
  • 10
  • 39
  • 76
0
votes
1 answer

App crashing on some random devices

Today I encountered a Strange Problem in my app. SO in first activity, there is a navigation drawer with some items listed in listview (in drawer).there is scrollbar in navigation drawer. now, on some random devices Problems occurs. App is…
0
votes
1 answer

Android Navigation Drawer Content Frame Cannot be resolved

I am using the following code to implement a simple navigation drawer based on the sample given in the Android Developers site. public class MainActivity extends ActionBarActivity { Toolbar toolbar; DrawerLayout mDrawerLayout; private…
Shivam Bhalla
  • 1,879
  • 5
  • 35
  • 63
0
votes
1 answer

Android v7-sdk21 Hamburger Navigation Drawer toggle without show back arrow

It is possible to just show the Android default hamburger navigation drawer without change to back arrow feature?
0
votes
2 answers

How to reference android navigation up icon within Android Studio?

I have been searching the reference to the navigation up icon for android within android studio but cant find it. I am trying to add it to a toolbar. The toolbar is not the action bar. I have a toolbar in a sliding up panel. The picture below is…
Eugene H
  • 3,520
  • 3
  • 22
  • 39
0
votes
1 answer

Don't know why this code *works*

I'm reading code from the official (and quite outdated) sample about the Nav Drawer, that you can easily download from your IDE [in Android Studio, it's automatically imported if you choose to create a new Navigation Drawer Activity]. I'm really…
natario
  • 24,954
  • 17
  • 88
  • 158
0
votes
1 answer

Expanable navigation drawer list

I need to show an expandable list inside the Navigation Drawer. How can I achieve that. I've done creating only a list by this code String [] menu = new String[]{"Home","Android","Windows","Linux","Raspberry Pi","WordPress","Videos","Contact…
0
votes
3 answers

When to call openDrawer() (or any other animation) to make it visible on startup?

I want my app to show the side navigation drawer as soon as the main activity is created. My code works fine - user launches app and gets the open drawer - but I'd like to actually see the side drawer sliding from the left; instead, I find the…
natario
  • 24,954
  • 17
  • 88
  • 158
0
votes
1 answer

NavigationDrawer and Up Navigation

I implemented a BaseActivity which extends the ActionBarActivity and implements a NavigationDrawer. All my Activities are inheriting from this BaseActivity. Im now wondering if i can implement a NavigationDrawer and still have the proper up…
Mulgard
  • 9,877
  • 34
  • 129
  • 232