Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.89 KB

SHARED_DIALOG.md

File metadata and controls

43 lines (29 loc) · 1.89 KB

Fusion

Fusion By BlackBeared License: GPL v3

An Easy-to-use Kotlin based Customizable Library with Material Layouts by @blackbeared.

Custom Shared dialog with two different views.

Fusion

Sample Usage

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()

Description

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.