File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
app/src/main/kotlin/com/fernandocejas/sample/core/platform Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,10 @@ package com.fernandocejas.sample.core.platform
1717
1818import android.os.Bundle
1919import androidx.appcompat.app.AppCompatActivity
20- import androidx.appcompat.widget.Toolbar
2120import com.fernandocejas.sample.R.id
2221import com.fernandocejas.sample.R.layout
2322import com.fernandocejas.sample.core.extension.inTransaction
24- import kotlinx.android.synthetic.main.toolbar.toolbar
23+ import kotlinx.android.synthetic.main.toolbar.*
2524
2625/* *
2726 * Base Activity class with helper methods for handling fragment transactions and back button
@@ -39,14 +38,12 @@ abstract class BaseActivity : AppCompatActivity() {
3938 }
4039
4140 override fun onBackPressed () {
42- (supportFragmentManager.findFragmentById(
43- id.fragmentContainer) as BaseFragment ).onBackPressed()
41+ (supportFragmentManager.findFragmentById(id.fragmentContainer) as BaseFragment ).onBackPressed()
4442 super .onBackPressed()
4543 }
4644
4745 private fun addFragment (savedInstanceState : Bundle ? ) =
48- savedInstanceState ? : supportFragmentManager.inTransaction { add(
49- id.fragmentContainer, fragment()) }
46+ savedInstanceState ? : supportFragmentManager.inTransaction { add(id.fragmentContainer, fragment()) }
5047
5148 abstract fun fragment (): BaseFragment
5249}
You can’t perform that action at this time.
0 commit comments