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

Crash when call List Adapter Inside Fragment

My Imports import java.util.ArrayList; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import com.dwellesque.R; import com.dwellesque.util.Extraadap; import com.dwellesque.util.XMLfunctions; import…
0
votes
2 answers

Fragment error in android navigation drawer

Hello I'm getting expression expected error multiple times and I don't know what i'm doing wrong, if someone can help me that will be great. Thanks. import android.support.v4.app.Fragment; import android.app.Activity; import…
kaydrae
  • 123
  • 2
  • 9
0
votes
1 answer

Navigating up from an activity to a specific fagment in the parent activity

I'm trying to make the UP button provide back navigation to a specific fragment in the parent activity. Activity1 contatins FragmentA and FragmentB. You can launch Activity2 from FragmentB. Activity1 is declared as the parent of Activity2 in the…
Dennis
  • 2,271
  • 6
  • 26
  • 42
0
votes
0 answers

Android Navigation Drawer, Fragments, DialogFragment

I am lost at how to implement this scenario: I want to use NavigationDrawer for top-level switching. It will be something like this: Fragments are used for all the Top Level Views and Lower Level Views. This means I only have One Activity. In the…
0
votes
2 answers

android: Launch the navigation bar dropdown menu with a button

I'm trying to write code so that when a button is pressed, the dropdown menu in the navigation bar comes up. I tried making something similar to the following prefab function (which I understand to be the one responsible for opening the menu) public…
user2824889
  • 1,085
  • 5
  • 16
  • 28
0
votes
2 answers

Android development - Navigating using Activities or fragments

Im new to android development and have a question about application navigation. At the moment I have a number of items in an OptionsMenu that drops down in the top right of the app. All of my activities has this same OptionsMenu. Each item in that…
0
votes
1 answer

Nav Drawer items staying highlighted and not clickable

I have implemented a fragment activity with a nav drawer, which works well for clicking and loading the fragments that are listed in the nav drawer. When you click an item in my nav drawer it loads the new fragment and highlights the correct list…
Mike
  • 6,751
  • 23
  • 75
  • 132
0
votes
1 answer

Android Actionbar tabs Navigation

I am a beginner in android. I have created Tabs using ActionBar tabs. Now I want to implement, when the user in in first tab and clicks back Button activity should close or when the user is in second tab, he clicks the backbutton the app should show…
Vishnu Prabhu
  • 449
  • 1
  • 5
  • 19
0
votes
1 answer

In some devices when using the Navigation drawer the up caret does not get replaced by the application icon

I downloaded the code provided for Navigation Drawer as mentioned at Creating a Navigation Drawer I tried it on a few devices and the application icon + drawer icon combo replaces the up caret icon But on one of my devices running on 4.2.1 the…
Sangeet Menon
  • 9,555
  • 8
  • 40
  • 58
0
votes
1 answer

android up navigation behave as back

There are a activities in my application. Lets call them activities 1,2,3. All of them child to MainActivity. In my application I define for each child activity:
Jacob
  • 1,135
  • 5
  • 14
  • 29
0
votes
1 answer

ClassCastException when switching tabs from dialog

In my app, I have a dual tabbed activity, each tab corresponding to a fragment. In one of my tabs, I prompt the user for an option, which upon confirmation, should switch the tab. So my code for creating the dialog, and switching the tab looks like…
0
votes
1 answer

Tabs and fragments navigation issue

I have a main activity with two tabs, Tab1 and Tab2. Tab1 has a ListFragment. Tab2 has a Webview Fragment. If I select a list item on ListFragment, it navigates to DetailFragment. Then, if I click on Tab2 and then press Tab1, I still viewing…
0
votes
1 answer

ActionBar Tabs "locked" below ActionBar

Is there any way, how to set that the Navigation Tabs will be displayed below Action-bar every-time? On my phone is the view like I want it to be - tabs below Action-bar - but on tablet are the tabs inside the Action-bar. Is there any way how to…
0
votes
1 answer

Navigation Drawer FC at Adapter

I am following a guide for a Navigation Drawer implementation. Theguide has icons for each item in the navigation drawer and I am editing it so that it does not have icons for each item. Asa result I broke something and now it FC's at the adapter.…
Mike
  • 6,751
  • 23
  • 75
  • 132
0
votes
1 answer

How to set up navigation drawer opener and closer?

I have implemented a navigation drawer with fragments but I seemed to have messed it up a little bit. Currently whenever the drawer closes without an listitem being selected it re loads a fragment. My MainDrawer class which holds the fragments…
Mike
  • 6,751
  • 23
  • 75
  • 132