diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt index bc36ff90..a60e7512 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt @@ -53,6 +53,8 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera private const val TIMER_2_SECONDS = 2001 } + private val binding by viewBinding(ActivityMainBinding::inflate) + private lateinit var defaultScene: Scene private lateinit var flashModeScene: Scene private lateinit var timerScene: Scene @@ -66,7 +68,6 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera private var mLastHandledOrientation = 0 private var countDownTimer: CountDownTimer? = null - private val binding by lazy(LazyThreadSafetyMode.NONE) { ActivityMainBinding.inflate(layoutInflater) } private val tabSelectedListener = object : TabSelectedListener { override fun onTabSelected(tab: TabLayout.Tab) { handlePermission(PERMISSION_RECORD_AUDIO) { diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/camera/activities/SettingsActivity.kt index 5a7e05b8..cc66798a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/SettingsActivity.kt @@ -17,7 +17,7 @@ import java.util.* import kotlin.system.exitProcess class SettingsActivity : SimpleActivity() { - private val binding by lazy(LazyThreadSafetyMode.NONE) { ActivitySettingsBinding.inflate(layoutInflater) } + private val binding by viewBinding(ActivitySettingsBinding::inflate) override fun onCreate(savedInstanceState: Bundle?) { isMaterialActivity = true