Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.75 KB

ALERT_DIALOG.md

File metadata and controls

42 lines (29 loc) · 1.75 KB

Fusion

Fusion By BlackBeared License: GPL v3

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

Fully Customizable Alert dialog.

Fusion

Sample Usage

Alert dialog provides a facility to select either positive or negative option with fully customizable interface. Here is a kotlin code to use Alert Dialog.

   AwesomeGeneralDialog(this)
                    .setTopColor(ContextCompat.getColor(this, R.color.color_deep_orange))
                    .setIcon(R.drawable.ic_alert)
                    .setTitle("Custom Alert...!")
                    .setPositiveButton("Ok", object : View.OnClickListener {
                        override fun onClick(p0: View?) {
                            AwesomeToast.success(this@Dashboard, "Ok clicked").show()
                        }

                    })
                    .setNegativeButton("Cancel", object : View.OnClickListener {
                        override fun onClick(p0: View?) {
                            AwesomeToast.error(this@Dashboard, "Cancel clicked").show()
                        }

                    })
                    .setMessage("Set Custom Ok and Cancel Handlers.")
                    .setPositiveButtonColor(ContextCompat.getColor(this, R.color.color_deep_orange))
                    .show()

Description

Write the above code to get the custom alert message.