From 3db1fdb9f9fa5f49c03860e64cdaf2d9eab989b3 Mon Sep 17 00:00:00 2001 From: fatih ergin Date: Mon, 21 Aug 2023 23:44:13 +0300 Subject: [PATCH] use common helper function for binding activities --- .../com/simplemobiletools/keyboard/activities/MainActivity.kt | 2 +- .../keyboard/activities/ManageClipboardItemsActivity.kt | 2 +- .../simplemobiletools/keyboard/activities/SettingsActivity.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/MainActivity.kt index 114d835..554ee68 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/MainActivity.kt @@ -15,7 +15,7 @@ import com.simplemobiletools.keyboard.R import com.simplemobiletools.keyboard.databinding.ActivityMainBinding class MainActivity : SimpleActivity() { - private val binding by lazy(LazyThreadSafetyMode.NONE) { ActivityMainBinding.inflate(layoutInflater) } + private val binding by viewBinding(ActivityMainBinding::inflate) override fun onCreate(savedInstanceState: Bundle?) { isMaterialActivity = true diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/ManageClipboardItemsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/ManageClipboardItemsActivity.kt index 10ad537..f3c6db2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/ManageClipboardItemsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/ManageClipboardItemsActivity.kt @@ -30,7 +30,7 @@ class ManageClipboardItemsActivity : SimpleActivity(), RefreshRecyclerViewListen private const val PICK_IMPORT_CLIPS_SOURCE_INTENT = 22 } - private val binding by lazy(LazyThreadSafetyMode.NONE) { ActivityManageClipboardItemsBinding.inflate(layoutInflater) } + private val binding by viewBinding(ActivityManageClipboardItemsBinding::inflate) override fun onCreate(savedInstanceState: Bundle?) { isMaterialActivity = true diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/SettingsActivity.kt index 5801ac4..9ef848c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/SettingsActivity.kt @@ -16,7 +16,7 @@ import java.util.Locale 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