Fragment onCreateView Called but doesn't show up
I have Activity with fragment A. When I click to some view I need to show another fragment B.
I show the fragment(A) the following way.
supportFragmentManager
.beginTransaction()
.replace(R.id.container, FragmentA(), "FragmentA")
.commit()
This is how I show up Fragment(B)
supportFragmentManager.beginTransaction()
.add(R.id.container, FragmentB(), "FragmentB")
.addToBackStack("FragmentA")
.commit()
But when I call many times showFragmentB() -> popBackStack()...