Builder


class Builder
kotlin.Any
   ↳ android.os.vibrator.HapticFeedbackRequest.Builder

Builder for HapticFeedbackRequest.

Summary

Public constructors

Constructs a builder that is already populated with the fields from a given HapticFeedbackRequest.

Builder(constant: Int)

Constructs a new builder for HapticFeedbackRequest.

Public methods
HapticFeedbackRequest

Builds a new HapticFeedbackRequest from this builder object.

HapticFeedbackRequest.Builder
setFlags(flags: Int)

Sets the HapticFeedbackConstants flags for the haptic feedback request.

HapticFeedbackRequest.Builder
setUsage(usage: Int)

Sets the VibrationAttributes usage for the haptic feedback request.

Public constructors

Builder

Builder(request: HapticFeedbackRequest)

Constructs a builder that is already populated with the fields from a given HapticFeedbackRequest.

Parameters
request HapticFeedbackRequest: the request to create a new builder from.
This value cannot be null.

Public methods

build

fun build(): HapticFeedbackRequest

Builds a new HapticFeedbackRequest from this builder object.

Return
HapticFeedbackRequest This value cannot be null.

setFlags

fun setFlags(flags: Int): HapticFeedbackRequest.Builder

Sets the HapticFeedbackConstants flags for the haptic feedback request.

Parameters
flags Int: Value is either 0 or a combination of the following:
Return
HapticFeedbackRequest.Builder This value cannot be null.