All Questions
Tagged with fragment-backstack android-activity
12 questions
0
votes
0
answers
241
views
Android. Determine the first fragment in the activity
Is it possible to determine with which fragment the activity was started. For example, I have an activity, and several fragments, I need to return from the last fragment to the first, is it possible ...
0
votes
0
answers
104
views
Activity with no fragment shows white background before finish
I have added number of fragments using fragmentTransaction's add and replace methods. After an action, I removed all the fragments in layout and when the back stack is empty, I called finish() on the ...
1
vote
1
answer
2k
views
Single activity multiple fragments / separate activities in a multi-step flow?
I've been developing Android for 3 years, and this is still a hard thing to decide when it comes to the similar scenario. Nowadays, I believe most of the applications has a multi-step screen / flow.
...
0
votes
0
answers
30
views
back stack keeps adding when using Intents
I have an activity A which uses a fragment A which has a list. The activity A can call on a search activity. The problem that I am seeing is if I were to go the search activity and then go back to the ...
-4
votes
1
answer
205
views
popBackStack() works in Fragment but not from Activity
I am simply closing fragment and going back to previous one by
getFragmentManager().popBackStack();
And it works, fragment is closed. But when I put the same code in the activity method and call ...
1
vote
2
answers
139
views
Loading a Fragment from an Activity to another Activity which is already in backstack
I have an activity(let's call it Home Activity) with bottom navigation view where I replace all of my fragments. In Home Activity I have loaded a fragment which has a search icon. That search icon ...
2
votes
5
answers
5k
views
Returning to MainActivity's fragment after return back from another Activity?
I have two Activities: MainActivity and OtherActivity. A fragment in MainActivity launches the OtherActivity, but when I press the back button at the top, it returns me to the MainActivity instead of ...
2
votes
0
answers
246
views
Handling multiple transitions between activity and fragments in android
I have 2 fragments in an activity A, Frg1 and Frg2. Frg1 requires an object o1 as input and Frg2 requires o2 as input.
There is another activity B.
So i start from Frg1 where I already have o1. So i ...
0
votes
2
answers
536
views
OnBackPress the fragment to be shown fails to update
Suppose I'm in fragment A, then moving to B, then using Back button returns to A.
In the activity I'm performing the following override:
@Override
public void onBackPressed(){
FragmentManager fm =...
0
votes
3
answers
823
views
Return to previous fragment from other activity
I have a simple problem.
My problem is that I have two activities:
Activity A
Activity B
In Activity A I display 4-5 fragments. That is the main activity (Navigation Drawer) so I display 4-5 ...
0
votes
0
answers
89
views
removing fragment from backstack
I want to remove fragment from backstack in the following situations
activity1-->fragment 1-->fragment
activity1-->fragment 1-->activity2
in both cases on back should return to activity1 skipping ...
0
votes
3
answers
4k
views
Navigate via back-button from child fragment back to parent activity
I have a main activity and 2 fragments. In my main activity I have navigation drawer that navigates through the fragments. I handle the back button pressed like this:
@Override
public void ...