public final class

TextViewStyle.Builder

extends ViewStyle.BaseBuilder<TextViewStyle, TextViewStyle.Builder>

 java.lang.Object

androidx.autofill.inline.common.BundledStyle.Builder<ViewStyle>

androidx.autofill.inline.common.ViewStyle.BaseBuilder<TextViewStyle, TextViewStyle.Builder>

↳androidx.autofill.inline.common.TextViewStyle.Builder

Overview

Builder for the TextViewStyle.

Summary

Fields
from BundledStyle.Builder<T>mBundle
Constructors
publicBuilder()

Methods
public abstract BundledStylebuild()

Returns a subclass of BundledStyle built by this builder.

protected TextViewStyle.BuildergetThis()

public TextViewStyle.BuildersetTextColor(int textColor)

Specifies the text color.

public TextViewStyle.BuildersetTextSize(float textSize)

Specifies the text size, in sp.

public TextViewStyle.BuildersetTextSize(int unit, float size)

Specifies the text size in the provided unit.

public TextViewStyle.BuildersetTypeface(java.lang.String fontFamily, int fontStyle)

Specifies the text font family and style.

from ViewStyle.BaseBuilder<T, B>setBackground, setBackgroundColor, setLayoutMargin, setPadding
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Methods

protected TextViewStyle.Builder getThis()

public TextViewStyle.Builder setTextSize(float textSize)

Specifies the text size, in sp.

Parameters:

textSize: The scaled pixel size.

See also: TextView

public TextViewStyle.Builder setTextSize(int unit, float size)

Specifies the text size in the provided unit.

Parameters:

unit: The desired dimension unit.
size: The device independent pixel size.

See also: TextView

public TextViewStyle.Builder setTextColor(int textColor)

Specifies the text color.

Parameters:

textColor: A color value in the form 0xAARRGGBB.

See also: TextView

public TextViewStyle.Builder setTypeface(java.lang.String fontFamily, int fontStyle)

Specifies the text font family and style. If the font family can not be found/loaded from the renderer process, it may fallback to the default system font.

Parameters:

fontFamily: the font family for the type face
fontStyle: the style for the type face.

See also: , TextView

public abstract BundledStyle build()

Returns a subclass of BundledStyle built by this builder.