Questions tagged [back]

Method or control to return user to previous state, page or screen.

Refers to questions about preventing, detecting, handling, controlling, etc:

  1. The back button on web browsers
    • History of visited sites
    • Backing out of a "dirty" page
  2. The hardware or software back button on smartphones and other similar devices
  3. Navigation in Android/IOS applications
    • Returning to the previous view
    • Exiting the application (Android)

et cetera.

Does not refer to

  • Keyboard backspace key (^H)
  • Keyboard delete key (^?)
  • Reverse side of a physical device
  • Previous versions of an application
1428 questions
258
votes
17 answers

How to Detect Browser Back Button event - Cross Browser

How do you definitively detect whether or not the user has pressed the back button in the browser? How do you enforce the use of an in-page back button inside a single page web application using a #URL system? Why on earth don't browser back…
Xarus
  • 5,145
  • 4
  • 12
  • 21
256
votes
10 answers

Override back button to act like home button

On pressing the back button, I'd like my application to go into the stopped state, rather than the destroyed state. In the Android docs it states: ...not all activities have the behavior that they are destroyed when BACK is pressed. When the user…
bdls
  • 4,548
  • 6
  • 22
  • 30
216
votes
13 answers

How to prevent going back to the previous activity?

When the BACK button is pressed on the phone, I want to prevent a specific activity from returning to its previous one. Specifically, I have login and sign up screens, both start a new activity called HomeScreen when successful login/signup occurs.…
ecem
  • 3,334
  • 2
  • 27
  • 38
131
votes
6 answers

How to go back (ctrl+z) in vi/vim

In normal text editors [with all due respect to Vim] there is a shortcut Ctrl+Z when you have done something nasty and want to return to the previous version of the text. Like BACK button in Word. I wonder how can you achieve this behaviour in Vim.
Slazer
  • 4,100
  • 7
  • 25
  • 53
128
votes
6 answers

Back to previous page with header( "Location: " ); in PHP

The title of this question kind of explains my question. How do I redirect the PHP page visitor back to their previous page with the header( "Location: URL of previous page" );
Web_Designer
  • 64,966
  • 87
  • 197
  • 254
103
votes
12 answers

back button callback in navigationController in iOS

I have pushed a view onto the navigation controller and when I press the back button it goes to the previous view automatically. I want to do a few things when back button is pressed before popping the view off the stack. Which is the back button…
Namratha
  • 15,910
  • 25
  • 86
  • 123
102
votes
8 answers

How to handle Back button with in the dialog?

I am developing an application that when the button is pressed, it opens a dialog with OK and Cancel buttons. It works fine. When the user presses the back button, I am handling this as follows public boolean onKeyDown(int keyCode, KeyEvent event)…
kiran
  • 3,080
  • 5
  • 32
  • 55
75
votes
7 answers

Prevent back button from closing a dialog box

I am trying to prevent an AlertDialog box from closing when pressing the back button in Android. I have followed both of the popular methods in this thread, and with System.out.println I can see that in both cases the code executes. However, the…
CaptainProg
  • 5,188
  • 22
  • 67
  • 109
74
votes
5 answers

Android - Simulate Back Button

When i press a button in my app, I need to return to the last activity. Any ideas?
david
  • 2,046
  • 4
  • 24
  • 34
60
votes
9 answers

Android: Cancel Async Task

I use an async task to upload an image and get some results. While uploading the image I see a progress dialog, written in onPreExecute() method like this: protected void onPreExecute() { uploadingDialog = new…
steliosf
  • 2,921
  • 2
  • 29
  • 44
48
votes
10 answers

React Native - Device back button handling

I want to check if there are more than one screens are on stack when device back button is hit. If yes, I want to show previous screen and if no, I want to exit app. I have checked number of examples but those use BackAndroid and Navigator. But both…
Virat18
  • 2,797
  • 1
  • 21
  • 28
44
votes
17 answers

Fragment pressing back button

I am now having an activity containing fragments [1] , [2] , [3] , [4] If pressing buttons , [3] , it can be redirected to [4] I would like to implement the back button as shown follow.. when pressing back at [4] , it return to [3] when pressing…
Raju yourPepe
  • 2,588
  • 12
  • 60
  • 124
43
votes
4 answers

Android - How to animate an activity transition when the default back button is pressed

In my activity, I have a button with the following click listener that is working great: final ImageButton startOverButton = (ImageButton) findViewById(R.id.start_over_button); startOverButton.setOnClickListener(new View.OnClickListener(){ …
38
votes
12 answers

Android make view disappear by clicking outside of it

I have some views that I make visible upon a button press. I want them to disappear if I click outside of those views. How would this be done on Android? Also, I realize that the "back button" can also assist Android users with this - I might use…
CQM
  • 36,672
  • 69
  • 214
  • 357
36
votes
1 answer

Keyboard shortcut to navigate Back Forward in Notepad++

In Eclipse, we can use Alt + Left to navigate Back, and Alt + Right to navigate Forward. Is this shortcut available in Notepad++? If no, can it be installed using plugins?
Trivikram
  • 731
  • 1
  • 7
  • 16
1
2 3
95 96