setUnitLabel

open fun setUnitLabel(@NonNull unitLabel: String, @IntRange(from = 1) defaultValue: Int, @IntRange(from = 1) minimumValue: Int, @IntRange(from = 1) maximumValue: Int, @Nullable listener: UnitSelectionEditText.UnitSelectionListener)

Sets unit label.

Parameters

unitLabel

Unit label format. This format string must contain "%d" or "%s" to substitute correct value during formatting. For example when using "%d pt" unit label text will be formatted as "10 pt".

defaultValue

Default value of the unit label. Must be grater than 0.

minimumValue

Maximum value allowed. Must be greater than 0 and less than or equal to defaultValue.

maximumValue

Minimum value allowed. Must be greater than 0 and and greater than or equal to defaultValue.

listener

Listener for text changes.