public abstract class

ViewStyle.BaseBuilder<T extends ViewStyle, B extends ViewStyle.BaseBuilder>

extends BundledStyle.Builder<ViewStyle>

 java.lang.Object

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

↳androidx.autofill.inline.common.ViewStyle.BaseBuilder<T, B>

Subclasses:

ImageViewStyle.Builder, ViewStyle.Builder, TextViewStyle.Builder

Overview

An abstract builder class for any subclass of ViewStyle.

Summary

Fields
from BundledStyle.Builder<T>mBundle
Constructors
protectedBaseBuilder(java.lang.String style)

Methods
protected abstract ViewStyle.BaseBuilder<T, B>getThis()

Returns this with the actual type of the subclass, so the setter methods can be chained.

public ViewStyle.BaseBuilder<T, B>setBackground(Icon icon)

Sets the background.

public ViewStyle.BaseBuilder<T, B>setBackgroundColor(int color)

Sets the background color, it will always override the ViewStyle.BaseBuilder.setBackground(Icon), regardless of which set method is call first.

public ViewStyle.BaseBuilder<T, B>setLayoutMargin(int start, int top, int end, int bottom)

Sets the layout margin through the view's layout param.

public ViewStyle.BaseBuilder<T, B>setPadding(int start, int top, int end, int bottom)

Sets the padding.

from BundledStyle.Builder<T>build
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

protected BaseBuilder(java.lang.String style)

Methods

protected abstract ViewStyle.BaseBuilder<T, B> getThis()

Returns this with the actual type of the subclass, so the setter methods can be chained.

public ViewStyle.BaseBuilder<T, B> setBackground(Icon icon)

Sets the background.

Parameters:

icon: The icon to use as the background

See also: android.graphics.drawable.Icon, android.view.View

public ViewStyle.BaseBuilder<T, B> setBackgroundColor(int color)

Sets the background color, it will always override the ViewStyle.BaseBuilder.setBackground(Icon), regardless of which set method is call first.

Parameters:

color: the color of the background

See also: android.view.View

public ViewStyle.BaseBuilder<T, B> setPadding(int start, int top, int end, int bottom)

Sets the padding.

Note that the method takes start/end rather than left/right, respecting the layout direction.

Parameters:

start: the start padding in pixels
top: the top padding in pixels
end: the end padding in pixels
bottom: the bottom padding in pixels

See also: android.view.View

public ViewStyle.BaseBuilder<T, B> setLayoutMargin(int start, int top, int end, int bottom)

Sets the layout margin through the view's layout param.

Note that the method takes start/end rather than left/right, respecting the layout direction.

Parameters:

start: the start margin size
top: the top margin size
end: the end margin size
bottom: the bottom margin size

See also: , android.view.View