Questions tagged [back-stack]

"Back stack" is a stack in which activities within an Android task are arranged. Android task is a collection of activities that users interact with when performing a certain job. Through this process activities are placed on the stack, in the order in which each activity is opened. Activities can be accessed later in reverse order by pressing the "back" button.

658 questions
0
votes
1 answer

An issue with actionbarsherlock fragments and backstack

I'm trying to learn how to work with fragments, using the actionbarsherlock. I tried to follow this tutorial. Everything worked, until the point I tried to create another fragment, which will not be a part of the action bar. A user clicks a button…
Igal
  • 5,833
  • 20
  • 74
  • 132
0
votes
1 answer

Asynchronous launching and finishing Activites

OK, here's my case. I have activities A, B, C, D. They get launched from one another in the order A -> C -> D. B is interchangeable with A (a combination B -> C -> D is equally possible). I also have a service that awaits an event and another…
pstobiecki
  • 1,804
  • 1
  • 17
  • 30
0
votes
1 answer

Android - Managing fragment swapping

My application has an activity A which on creation loads a ListFragment -> Fa. On selecting one of the items, Fa is added to the BackStack and is replaced with another instance of Fa with a different set of data. Selecting an item in this new…
shantanu
  • 204
  • 2
  • 7
0
votes
4 answers

Android Activity management

I have one question in mind for activity management. Suppose I have 4 activities say for example A1,A2,A3,A4. Now A1 have one button which start activity A2. A2 have 2 buttons which start either A3 or A4, A3 have 2 buttons which start activity A4…
Bhavin Chauhan
  • 1,950
  • 1
  • 26
  • 47
0
votes
1 answer

Issue with back button between Fragments (backstack)

I have an app with 3 tabs. For two of theese tabs I have buttons where I change the current fragment with a new one with this code: MapFragment newFragment = new JourneyMapFragment(mContext, getFromDestinationCoordinate(),…
Maggie
  • 33
  • 2
  • 6
0
votes
1 answer

Let onBackPressed() close application

I have an application that uses fragments. On app launch I do this: FragmentManager man = getFragmentManager(); FragmentTransaction trans = man.beginTransaction(); trans.replace(R.id.master_container, master); trans.commit(); As you…
AreusAstarte
  • 1,958
  • 2
  • 17
  • 29
0
votes
1 answer

webview backstack lost after screen rotation, back button history of pages, Android

I have a WebView in an Activity and it works great in one screen orientation. I can navigate around to different pages on a website and when I hit the back button it goes back to the the previous pages that I visited before, however when I rotate…
Kevik
  • 9,181
  • 19
  • 92
  • 148
0
votes
1 answer

Allow backstack to fill with dozens of reinstantiated activities?

This a straightforward question but I can't find any clear information to help me make my decision. I have an application with 2 forms (2 activities) that are filled in for a given object, cleared and then filled in for the next object. This maybe…
nme32
  • 213
  • 2
  • 15
0
votes
1 answer

Activity LaunchMode

This is the Activity tag i have in my Manifest: What i want to accomplish is: Activity_A ---> Activity_B ---> Activity_C --->…
Archie.bpgc
  • 23,812
  • 38
  • 150
  • 226
0
votes
2 answers

Control Back Location From Activity

I have an app that has three activities. Activity1 collects the data (numbers from the players of a sports game) Activity2 displays TextViews that are clickable based on the data from Activity1 (Activity2 looks up the numbers entered from…
The Hawk
  • 1,496
  • 6
  • 26
  • 43
0
votes
0 answers

onResume() get called when press back button

There is a strange thing happening when I press back button, the same Activity's onResume() method is getting called. Does it mean there are more than one instances of this Activity in stack? Can someone here tell me what is happening? Edit: 12-27…
aneela
  • 1,457
  • 3
  • 24
  • 45
0
votes
1 answer

How to get result from an activity if an application has been restored

The question title is possibly not clear enough. It addresses the problem of passing results from a child activity to a parent activity after the application has been "killed" by Android on low resources condition, and then automatically restored…
Stan
  • 8,683
  • 9
  • 58
  • 102
0
votes
1 answer

What is the order used to restore a stack of activities?

Android documentation provides a seemingly thorough description of Tasks and Back Stack, yet I can't find an answer to the following question: in which order do activities get restored (re-created) when their task (previously killed by the system)…
Stan
  • 8,683
  • 9
  • 58
  • 102
0
votes
4 answers

Difficulty understanding back stack and tasks

I read about tasks and back stack (http://developer.android.com/guide/components/tasks-and-back-stack.html) but still having few confusions . I was just trying different things and stcuk on one case . So lets take a example : We have two apps A1 and…
user1875798
  • 263
  • 3
  • 6
  • 16
0
votes
6 answers

Exit Android application on back button

I have ImageButton with back arrow in header of my application. When user presses it, I call finish() on current Activity. I also have option for user to go home, but I want to somehow clear Activity history, so when user presses back button on home…
Loadeed
  • 557
  • 2
  • 8
  • 18