Merge pull request #439 from fatihergin/feature/use-binding-extensions-to-inflate-activies
use binding extension to inflate activities
This commit is contained in:
commit
b8643a4024
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue