android-components / mozilla.components.feature.addons.ui / PermissionsDialogFragment

PermissionsDialogFragment

class PermissionsDialogFragment : AppCompatDialogFragment (source)

A dialog that shows a set of permission required by an Addon.

Types

Name Summary
PromptsStyling data class PromptsStyling
Styling for the permissions dialog.

Constructors

Name Summary
<init> PermissionsDialogFragment()
A dialog that shows a set of permission required by an Addon.

Properties

Name Summary
onNegativeButtonClicked var onNegativeButtonClicked: () -> Unit
A lambda called when the deny button is clicked.
onPositiveButtonClicked var onPositiveButtonClicked: (Addon) -> Unit
A lambda called when the allow button is clicked.

Functions

Name Summary
onCreateDialog fun onCreateDialog(savedInstanceState: <ERROR CLASS>?): <ERROR CLASS>
onDismiss fun onDismiss(dialog: <ERROR CLASS>): Unit

Companion Object Functions

| Name | Summary | |—|—| | newInstance | fun newInstance(addon: Addon, promptsStyling: PromptsStyling? = PromptsStyling( gravity = Gravity.BOTTOM, shouldWidthMatchParent = true ), onPositiveButtonClicked: (Addon) -> Unit = null, onNegativeButtonClicked: () -> Unit = null): PermissionsDialogFragment
Returns a new instance of PermissionsDialogFragment. |

Extension Functions

Name Summary
consumeFrom fun <S : State, A : Action> Fragment.consumeFrom(store: Store<S, A>, block: (S) -> Unit): Unit
Helper extension method for consuming State from a Store sequentially in order inside a Fragment. The block function will get invoked for every State update.
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.