Register now for Android Dev Summit 2019!

Builder

class Builder
kotlin.Any
   ↳ androidx.car.uxrestrictions.CarUxRestrictions.Builder

Builder class for CarUxRestrictions

Summary

Public constructors

<init>(requiresDistractionOptimization: Boolean, activeRestrictions: Int, timestamp: Long)

Public methods

CarUxRestrictions

Build and return the CarUxRestrictions object

CarUxRestrictions.Builder
setMaxContentDepth(maxContentDepth: Int)

Set the maximum number of levels that the user can navigate to when CarUxRestrictions#UX_RESTRICTIONS_LIMIT_CONTENT is imposed.

CarUxRestrictions.Builder
setMaxCumulativeContentItems(maxCumulativeContentItems: Int)

Set the maximum number of cumulative content items that can be displayed when CarUxRestrictions#UX_RESTRICTIONS_LIMIT_CONTENT is imposed.

CarUxRestrictions.Builder
setMaxStringLength(maxStringLength: Int)

Set the maximum length of general purpose strings that can be displayed when CarUxRestrictions#UX_RESTRICTIONS_LIMIT_STRING_LENGTH is imposed.

Public constructors

<init>

Builder(requiresDistractionOptimization: Boolean, activeRestrictions: Int, timestamp: Long)

Public methods

build

@NonNull fun build(): CarUxRestrictions

Build and return the CarUxRestrictions object

setMaxContentDepth

@NonNull fun setMaxContentDepth(maxContentDepth: Int): CarUxRestrictions.Builder

Set the maximum number of levels that the user can navigate to when CarUxRestrictions#UX_RESTRICTIONS_LIMIT_CONTENT is imposed.

setMaxCumulativeContentItems

@NonNull fun setMaxCumulativeContentItems(maxCumulativeContentItems: Int): CarUxRestrictions.Builder

Set the maximum number of cumulative content items that can be displayed when CarUxRestrictions#UX_RESTRICTIONS_LIMIT_CONTENT is imposed.

setMaxStringLength

@NonNull fun setMaxStringLength(maxStringLength: Int): CarUxRestrictions.Builder

Set the maximum length of general purpose strings that can be displayed when CarUxRestrictions#UX_RESTRICTIONS_LIMIT_STRING_LENGTH is imposed.