Use viewBinding extension
This commit is contained in:
parent
a8d5c1fbb8
commit
dfdf816c4e
1 changed files with 3 additions and 2 deletions
|
@ -5,15 +5,16 @@ import com.simplemobiletools.calendar.pro.databinding.DatetimePatternInfoLayoutB
|
|||
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
||||
import com.simplemobiletools.commons.extensions.getAlertDialogBuilder
|
||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||
import com.simplemobiletools.commons.extensions.viewBinding
|
||||
|
||||
class DateTimePatternInfoDialog(activity: BaseSimpleActivity) {
|
||||
val binding by activity.viewBinding(DatetimePatternInfoLayoutBinding::inflate)
|
||||
|
||||
init {
|
||||
val view = DatetimePatternInfoLayoutBinding.inflate(activity.layoutInflater).root
|
||||
activity.getAlertDialogBuilder()
|
||||
.setPositiveButton(R.string.ok) { _, _ -> { } }
|
||||
.apply {
|
||||
activity.setupDialogStuff(view, this)
|
||||
activity.setupDialogStuff(binding.root, this)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue