use common helper function for binding activities

This commit is contained in:
fatih ergin 2023-08-21 23:44:13 +03:00
parent 27e054e023
commit 3db1fdb9f9
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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