lib / tv.smartclip.smartclientandroid.lib.dto / SxLayoutConfiguration

SxLayoutConfiguration

data class SxLayoutConfiguration

Defines the layout constraints of the video player.

Types

SxOrientation

Defines the aspect ratio respectively orientation of the video player.

enum class SxOrientation

Constructors

<init>

Defines the layout constraints of the video player.

SxLayoutConfiguration(width: Int = ViewGroup.LayoutParams.MATCH_PARENT, height: Int = 0, orientation: SxOrientation = SxOrientation.HORIZONTAL, dimensionRatio: String? = null, custom: ((constraintSet: ConstraintSet, playerViewId: Int) -> Unit)? = null)

Properties

custom

Allows to set custom constraints.

val custom: ((constraintSet: ConstraintSet, playerViewId: Int) -> Unit)?

dimensionRatio

Can be used to define the exact dimension ratio of the player view by setting the defined String to ConstraintSet.setDimensionRatio.

val dimensionRatio: String?

height

@see ConstraintSet.constrainHeight

val height: Int

orientation

Defines the aspect ratio respectively orientation of the expected advertisement.

val orientation: SxOrientation

width

@see ConstraintSet.constrainWidth

val width: Int

Functions

applyLayoutConfigurationToPlayerView

Applies the current SxLayoutConfiguration to the provided View. The view's parent must be a ConstraintLayout. Otherwise an UnsupportedOperationException is thrown.

fun applyLayoutConfigurationToPlayerView(playerView: View): Unit