How to open an existing fragment transaction in Android?

How to open an existing fragment transaction in Android?

Is Used to replace an existing fragment with new fragments from the drop-down list in the action bar?

+4
source share
2 answers

Just in case, this is what you asked, change

FragmentTransaction ft = openFragmentTransaction(); 

to

 FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); 
+1
source

How to open an existing fragment transaction in Android?

This concept makes no sense.

Is Used to replace an existing fragment with new fragments from the drop-down list in the action bar?

If necessary, create a new FragmentTransaction , call replace() on it to indicate what needs to be replaced, then commit() transaction

0
source

Source: https://habr.com/ru/post/1445185/


All Articles