Skip to content

Commit 1223e1b

Browse files
david-allisonBrayanDSO
authored andcommitted
chore: convert SingleFragmentActivity to ViewBinding
Issue 11116
1 parent f0e5111 commit 1223e1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

AnkiDroid/src/main/java/com/ichi2/anki/SingleFragmentActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import android.view.KeyEvent
2222
import androidx.fragment.app.Fragment
2323
import androidx.fragment.app.FragmentContainerView
2424
import androidx.fragment.app.commit
25+
import com.ichi2.anki.SingleFragmentActivity.Companion.getIntent
2526
import com.ichi2.anki.android.input.ShortcutGroup
2627
import com.ichi2.anki.android.input.ShortcutGroupProvider
2728
import com.ichi2.anki.dialogs.customstudy.CustomStudyDialog.CustomStudyAction
@@ -42,7 +43,7 @@ import kotlin.reflect.jvm.jvmName
4243
*
4344
* [getIntent] can be used as an easy way to build a [SingleFragmentActivity]
4445
*/
45-
open class SingleFragmentActivity : AnkiActivity() {
46+
open class SingleFragmentActivity : AnkiActivity(R.layout.single_fragment_activity) {
4647
override fun onCreate(savedInstanceState: Bundle?) {
4748
if (showedActivityFailedScreen(savedInstanceState)) {
4849
return
@@ -52,7 +53,6 @@ open class SingleFragmentActivity : AnkiActivity() {
5253
if (!ensureStoragePermissions()) {
5354
return
5455
}
55-
setContentView(R.layout.single_fragment_activity)
5656
setTransparentStatusBar()
5757

5858
// avoid recreating the fragment on configuration changes

0 commit comments

Comments
 (0)