Default UI - Customizing

In the specific platform sections, we learned how to configure the TireTreadScanView. Without specifying any properties, the Default UI is automatically active.

val svConfig = TireTreadScanViewConfig()

TireTreadScanView(context = this, config = svConfig, callback = this, onInitializationFailed = { ex -> /* handle */ })
kotlin

While ready out of the box, the Default UI is also customizable.

By providing a custom DefaultUiConfig object to the TireTreadScanViewConfig() you can customize the texts, and also hide default elements as needed:

val customConfig = DefaultUiConfig().apply {
    distanceIndicatorConfig.textMoveAway = "Afaste o dispositivo"
    distanceIndicatorConfig.textMoveCloser = "Aproxime o dispositivo"
    distanceIndicatorConfig.textOk = "Mantenha a distância"
}

val svConfig = TireTreadScanViewConfig().apply {
    defaultUiConfig = customConfig
}

TireTreadScanView(context = this, config = svConfig, callback = this, onInitializationFailed = { ex -> /* handle */ })
kotlin
If any element information is not provided, its default values will be used.

Here are the Default UI elements that can be customized, and their respective property names within the DefaultUiConfig class:

Element Property Name

Distance Indicator

distanceIndicatorConfig

Focus Point Tooltip

focusPointTooltipConfig

Tap to Start Scanning Tooltip

tapToStartScanningTooltipConfig

Tire Ovelay

tireOverlayConfig

Upload View

uploadViewConfig

Orientation Warning

orientationWarningConfig

Countdown

countdownConfig

Scan Direction

scanDirectionConfig

Tire Width Input

tireWidthInputConfig