Direct to use, multiple, smooth, can be applied to Kotlin & Android. Under continuous development...
PlateDialog(this).show {
setData("川A88888")
setOnConfirmClickListener {
Toast.makeText(this@MainActivity, it, Toast.LENGTH_SHORT).show()
}
}
PlateDialog(this).apply {
setData("川A88888")
setOnConfirmClickListener {
Toast.makeText(this@MainActivity, it, Toast.LENGTH_SHORT).show()
}
}.show()
CalendarDialog(this).show {
setDate("2023-7-24")
setOnConfirmClickListener { calendar, yearOfMonthOfDay ->
Toast.makeText(this@MainActivity, yearOfMonthOfDay, Toast.LENGTH_SHORT).show()
}
}
CalendarDialog(this, "yyyy/MM/dd").show {
setDate("2023/7/24")
setOnConfirmClickListener { calendar, yearOfMonthOfDay ->
Toast.makeText(this@MainActivity, yearOfMonthOfDay, Toast.LENGTH_SHORT).show()
}
}
Step 1:Add it in your root build.gradle or setting.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.laconichy:multielement-dialogs:1.1.0'
}
1、add PlateDialog
1、add CalendarDialog