Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.54 KB

CHOICE.md

File metadata and controls

36 lines (25 loc) · 1.54 KB

Fusion

Fusion By BlackBeared License: GPL v3

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

Multiple options selection dialog

Fusion

Sample Usage

You can select a multiple items from this dialog.

     val items = resources.getStringArray(R.array.food)
            AwesomeChoiceDialog(this, R.style.AppTheme)
                    .setTopColorRes(R.color.color_cyan)
                    .setTitle("Order your food.")
                    .setIcon(R.drawable.ic_food)
                    .setItemsMultiChoice(items, object : AwesomeChoiceDialog.OnItemsSelectedListener<String> {
                        override fun onItemsSelected(positions: List<Int>, items: List<String>) {
                            AwesomeToast.success(this@Dashboard,
                                    getString(R.string.you_ordered, TextUtils.join("\n", items)))
                                    .show()
                        }
                    })
                    .setConfirmButtonText("Ok")
                    .show()

Description

Add the above code to get the multiple items selection dialog, it will return you seleted items from the dialog.