Updated on 2026-08-14

This commit is contained in:
Tangem 2021-01-12 16:12:07 +03:00
commit 7bb49ef13a
45 changed files with 484 additions and 196 deletions

View file

@ -18,13 +18,9 @@ import com.tangem.wallet.R
fun FragmentActivity.openFragment(screen: AppScreen, addToBackStack: Boolean = true) {
val transaction = this.supportFragmentManager.beginTransaction()
.replace(
R.id.fragment_container,
fragmentFactory(screen),
screen.name
)
transaction.replace(R.id.fragment_container, fragmentFactory(screen), screen.name)
if (addToBackStack && screen != AppScreen.Home) transaction.addToBackStack(null)
transaction.commit();
transaction.commitAllowingStateLoss()
}
fun FragmentActivity.popBackTo(screen: AppScreen?, inclusive: Boolean = false) {