From cf6faf76a9cfb623b41f5274cc54790c3fd3bf6a Mon Sep 17 00:00:00 2001 From: Brayan Oliveira <69634269+brayandso@users.noreply.github.com> Date: Sat, 23 Nov 2024 17:54:56 -0300 Subject: [PATCH] refactor: set fragment tag in SingleFragmentActivity --- .../src/main/java/com/ichi2/anki/SingleFragmentActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/SingleFragmentActivity.kt b/AnkiDroid/src/main/java/com/ichi2/anki/SingleFragmentActivity.kt index 7268d43c841e..712aacc67292 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/SingleFragmentActivity.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/SingleFragmentActivity.kt @@ -73,7 +73,7 @@ open class SingleFragmentActivity : AnkiActivity() { arguments = intent.getBundleExtra(FRAGMENT_ARGS_EXTRA) } supportFragmentManager.commit { - replace(R.id.fragment_container, fragment) + replace(R.id.fragment_container, fragment, FRAGMENT_TAG) } } @@ -89,6 +89,7 @@ open class SingleFragmentActivity : AnkiActivity() { companion object { const val FRAGMENT_NAME_EXTRA = "fragmentName" const val FRAGMENT_ARGS_EXTRA = "fragmentArgs" + const val FRAGMENT_TAG = "SingleFragmentActivityTag" fun getIntent(context: Context, fragmentClass: KClass, arguments: Bundle? = null, intentAction: String? = null): Intent { return Intent(context, SingleFragmentActivity::class.java).apply {