Questions tagged [up-button]

In Android 3.0 and above, the Up button is used to navigate within an app based on the hierarchical relationships between screens.

As of Android 3.0, the Up button was added. It works similarly to the back button, but it never lets a user exit an app.

For more information, please refer to Android Developers design patterns

48 questions
69
votes
5 answers

Returning from an activity using navigateUpFromSameTask()

I have two activities, A and B. When activity A is first started, it accesses the Intent passed to it (because the Bundle is null, as it should be the first time through), and displays information accordingly: CustInfo m_custInfo; ... protected…
DavidCrow
  • 691
  • 1
  • 6
  • 5
12
votes
3 answers

How to customize the "up" button when the searchView is being expanded?

Background My app has the ability to search for items (which are other apps) using the SearchView on the ActionBar. The app uses the support library of Google, and it works well on all versions of Android from API 9 . The problem On Lollipop, when I…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
7
votes
2 answers

Login - Navigation Architecture Component

I implemented conditional navigation to my LoginFragment, with android navigation architecture component. The problem I facing now, is that I would like to hide the up button on the toolbar, and the disable any in-app navigation while the user is…
6
votes
5 answers

android - Implement UP button action with Navigation Drawer

Question I am using Navigation Drawer from Android Studio Template. I want to use UP button (arrow) in some of my fragments instend "Hamburger" button. I use AppCompatActivity. I use this code to show UP button arrow: public void UseUpButton(boolean…
5
votes
1 answer

Change custom Up/Back Button Icon on Android ActionBar

I'm trying to use a custom up/back button icon with a different color since I haven't been able to figure out a straight forward way of changing the color of the default android up/back button. I downloaded a 128x128 back button icon (PNG) and…
semilogo97
  • 125
  • 1
  • 2
  • 11
5
votes
2 answers

UpButton doesn't work whatever I try to do

In my app (minSdkVersion 15) I have a Toolbar instead of ActionBar and NavigationDrawer switching between fragments. Some fragments have TabBar with child fragments inside. These child fragments are ListViews, and their onItemClickListener triggers…
AlexKost
  • 2,792
  • 4
  • 22
  • 42
4
votes
0 answers

savedInstanceState in parent activity is null when up button in child activity is pressed

I have a problem with the usage of the Up button in my application. There are many posts that I already read dealing with similar problems, but none of them addresses the same issue that I want to solve. I have two activities - A and B. A displays…
castafiore
  • 81
  • 8
4
votes
1 answer

Settings activity up button

I have a SettingsActivity that should have an up button linking back to MainActivity. The button appears, but doesn't do anything when clicked. The back button works fine. AndroidManifest.xml:
RedBassett
  • 3,469
  • 3
  • 32
  • 56
4
votes
2 answers

How to implement getSupportParentActivityIntent() to set the activity dynamically for up-button in android

How to know which parent activity calls the child activity in android? Assume I have three activities A,B and C. A and B are parent activities. C is the child activity. That means C can be started by either from A or B. So how can I know which…
chathura
  • 3,362
  • 6
  • 41
  • 68
3
votes
2 answers

Dismiss dialog causes activity finish

My PanelActivity contains a recyclerView with a list of items. Each item has a click event. This click opens DetailsActivity. DetailsActivity has a floatingActionButton that opens a full screen dialog (my class DetailDialogFragment extends…
JCarlosR
  • 1,598
  • 3
  • 19
  • 32
3
votes
3 answers

How to hide the "Up button" in the top Fragment and show it in other Fragments?

In a Bluetooth-related app (with minSdkVersion="18") I have a single MainActivity.java, displaying one of the following 3 UI Fragments: MainFragment.java (the top screen) SettingsFragment.java (settings screen, entered through…
2
votes
2 answers

Activity Lifecyle Difference in Device's Back Button vs Actionbar's Back Button

I'm currently learning the Activity Lifecyle. I noticed the following: I have two Activitys, A and B. When I open Activity B from Activity A, A gets stopped and B gets created and started. When I press the Back Button on my device, B gets…
2
votes
0 answers

Android : The UpButton's click is intercepted by my drawer menu

When I click on the UpButton (actionBar's left arrow), it opens my drawer menu instead, and the onOptionsItemSelected method don't receive anything. How can I prevent my drawer menu from intercepting the Upbutton's click? AndroidManifest.xml…
Greelings
  • 4,964
  • 7
  • 34
  • 70
2
votes
1 answer

Up button in toolbar points right

I need to have an arrow "back" button on the left side of the toolbar, and for some reason it points right instead of left. How can I set it to the opposite direction? This is my code: mToolbar = (Toolbar) findViewById(R.id.machine_tool_bar); …
Maayan Castel
  • 133
  • 1
  • 13
2
votes
1 answer

Providing Up (aka Back) Navigation - with UI Fragments

The Google doc Providing Up Navigation explains, how to display an Up button in an application with several Activities (by specifying "parent" Activities in AndroidManifest.xml): However I am working on a Bluetooth application (starting with…
1
2 3 4