GroupSubscriptionSheet

class GroupSubscriptionSheet @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : FrameLayout

A bottomsheet that provides Group Subscription functionality.

You should setCallbacks on initialized view to get flow result.

Since

2.5.0

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0)

Properties

Link copied to clipboard

The function that provides an access token that will be used for retrieving group information and subscribing the user. NOTE: The token must have "groups" scope, otherwise you'll get an error. NOTE: The token won't be automatically refreshed, in case it's outdated you'll get an error. NOTE: In case you will pass null, the last token you received with the SDK will be used.

Link copied to clipboard

The id of the group the user will be subscribed to.

Link copied to clipboard

The host for snackbars. Pass the view after placing it on screen.

Link copied to clipboard

The widget style, can change appearance.

Functions

Link copied to clipboard
fun hide()

Hides the bottom sheet.

Link copied to clipboard
fun setCallbacks(onSuccess: () -> Unit, onFail: (VKIDGroupSubscriptionFail) -> Unit = {})

Callbacks that provide Group Subscription result.

Link copied to clipboard
fun show()

Show the bottom sheet.