use common helper function for binding activities
This commit is contained in:
parent
27e054e023
commit
3db1fdb9f9
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue