An Easy-to-use Kotlin based Customizable Library with Material Layouts by @blackbeared.
Shared dialog provides a facility to switch between two different dialogs. Here is a kotlin code to use Shared Dialog.
AwesomeSwitchableDialog(this)
.setTopView(R.layout.topview)
.setBottomView(R.layout.bottomview)
.configureTopView(object: AwesomeSwitchableDialog.topViewConfigurator{
override fun configureViewTop(v: View) {
}
})
.configureBottomView(object : AwesomeSwitchableDialog.bottomViewConfigurator{
override fun configureViewBottom(v: View) {
}
})
.setTopViewColor(Color.parseColor("#00BCD4"))
.setBottomViewColor(Color.parseColor("#FFFFFF"))
.setTopViewIcon(R.drawable.ic_login, Color.parseColor("#FFFFFF"))
.setBottomViewIcon(R.drawable.ic_register, Color.parseColor("#00BCD4"))
.show()
Define two different layout xml files, and set them as top and bottom view and configure views inside .configureTopView and .configureBottomview and then Add this code to use shared dialog in your app to use shared Dialog.