A
A
artshelom2017-08-27 16:30:18
Android
artshelom, 2017-08-27 16:30:18

How to go from fragment to fragment??

How to move from one fragment to another, I still do it in this way.

FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
                    fragmentTransaction.add(R.id.cont, new PostFragment(list.get(finalI).getHref()));
                    fragmentTransaction.commit();

But now this method does not suit me.
It is necessary that when moving from the first fragment to the second, SwipeRefreshLayout (which is in 1 fragment) is turned off, so that the back button returns to 1 fragment and SwipeRefreshLayout is turned on.
Is there any way to do this through a fragment or is it only implemented when moving from a fragment to an activity ???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2017-08-27
@artshelom

.replace(...).addToBackStack(...)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question