Android Fragment UI not updated after popBackStack()

supportFragmentManager.popBackStack()
supportFragmentManager.popBackStackImmediate("theFragment", 0)
val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.fragment, fragment)
transaction.addToBackStack("theFragment")
transaction.commit()

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rick_HK

Rick_HK

28 Followers

Hi this is Rick from Hong Kong. I am a native iOS and Android mobile developer and also a tech enthusiast. Find me on Twitter https://twitter.com/rick3817