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
0
votes
1 answer

android app crashes after adding Up Button

I'm learning how to user Android Studio and I'm working on an app that is a form, like the ones you would register as a user at a website. You add a username, your full name, email address and then use a DatePicker to select your date of birth. Then…
user71311
  • 11
  • 2
  • 8
0
votes
1 answer

Up Button not working if the activity extends AppCompatActivity

I launched Activity B via deep link and I'm expecting Activity A to be launched on Up Button click. Here's my manifest
M'hamed
  • 2,508
  • 3
  • 24
  • 41
0
votes
0 answers

android up button is not working as expected

I'm followed https://developer.android.com/training/appbar/up-action.html to add an up button for the app bar. my manifest is
hjchin
  • 864
  • 2
  • 8
  • 25
0
votes
0 answers

Up Button Inside Fragment Contained by PagerFragment

I have a couple of fragments being held inside a ViewPager contained in an fragment. How do I go about implementing the "Up Button" in this situation? I've been unsuccessful since I can't even make the Up button functionality appear on the screen.…
CBA110
  • 1,072
  • 2
  • 18
  • 37
0
votes
2 answers

Using activity.finish in up button

I want to define an up button for my android application to go to parent activity. From some resources I found this code when up-button clicked: NavUtils.navigateUpFromSameTask(getActivity()); But I had a problem and it was that my activity needs…
Reza Abbasi
  • 1,521
  • 2
  • 15
  • 21
0
votes
1 answer

How to preserve the initial state of an Activity having Spinner item in ActionBar

I want to implement a spinner Item in the actionBar, which sorts the Movies based on popularity, Rating and Revenues Here, I sorted based on Highest ratings and then clicked on a movie Item to display Movie Item Details. Steps to Implement: When I…
Shivanand T
  • 1,093
  • 1
  • 10
  • 18
0
votes
1 answer

Up Action Button not showing at toolbar

I'm trying to show up action button at Toolbar while I'm at fragment (using 1 parent activity) like this: https://developer.android.com/training/implementing-navigation/ancestral.html This up button must work as standard BackPress. But the main…
0
votes
1 answer

Android - Back button doesn't call onResume()

I'm a beginner at this, so bear with me. In my app, I want the theme of the app to update based upon user preference. I have a preferences page with a theme section, and here is the code for my MainActivity: @Override protected void onCreate(Bundle…
0
votes
0 answers

Is it possible to use the "up" button's drawable of the support library?

This is a very short question. Is it possible to use the drawable (including the animation) of the "up" button that's used on the support library? I'm talking about the one that when you open a navigation drawer, it transforms itself from 3 lines…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
0
votes
1 answer

Android - Add "Up Botton" for lower level activity with appcompat theme?

I am following the starter android development guide and trying to add a up bottom for lower level activities. However, I get an null pointer error when executing getActionBar().setDisplayHomeAsUpEnabled(true); Is it because of my theme (appcompat…
Jason
  • 821
  • 2
  • 16
  • 28
0
votes
1 answer

Up button doesn't work correctly in android 4.0.4

I have a main activity and a child activity. I am using up button in child activity to return to main activity. In my activity I have some animation that I don't want to start it again when I return to it form child activity. So here is home action…
Misagh Emamverdi
  • 3,654
  • 5
  • 33
  • 57
0
votes
1 answer

Dont know why my up button is not wotking

Here i setup this on oncreate method of second avticity super.onCreate(savedInstanceState); // Actionbar getActionBar().setDisplayHomeAsUpEnabled(true); setContentView(R.layout.new_message); And this is…
Kirtesh
  • 29
  • 1
  • 10
0
votes
2 answers

actionbar up button, extend click area when no title or icon

My actionbar does not use an icon or a title, this makes the click area of the "up" button very small. How can I have a larger click area without a title and icon in the actionbar?
CQM
  • 42,592
  • 75
  • 224
  • 366
0
votes
1 answer

Navigate up to last shown fragment

I've implemented a NavigationDrawer within the MainActivity which containts two Fragment. The second Fragment contains a ListView that opens a new Activity (onItemClick) that shows the according detailed data. (I guess that's pretty much the…
Kody
  • 1,154
  • 3
  • 14
  • 31
0
votes
2 answers

How to make Android up-button works by clicking on the activity title too, not only on the arrow, in lower Android versions?

In my app I am using up navigation. In newer Android apis, like Android 4.2, the up button is comprised by an arrow and the activity title, these two elements (arrow and activity title) look like a single button. But in older APIs, like Android…
androidevil
  • 9,011
  • 14
  • 41
  • 79