LayoutElementBuilders.FontSetting


@RequiresSchemaVersion(major = 1, minor = 400)
public interface LayoutElementBuilders.FontSetting


Interface defining a single point of customization in a font.

Summary

Public methods

default static @NonNull LayoutElementBuilders.FontSetting
@RequiresSchemaVersion(major = 1, minor = 400)
weight(@FloatRange(from = 1, to = 1000) float value)

FontSetting option for custom weight for font.

Public methods

weight

Added in 1.2.0-alpha03
@RequiresSchemaVersion(major = 1, minor = 400)
default static @NonNull LayoutElementBuilders.FontSetting weight(@FloatRange(from = 1, to = 1000) float value)

FontSetting option for custom weight for font. Similar to the FontWeightProp but it accepts any value between 1 and 1000.

Note that using this FontSetting will override setWeight.

Parameters
@FloatRange(from = 1, to = 1000) float value

weight, in 1..1000

Throws
java.lang.IllegalArgumentException

if the given value is not between 1 and 1000.