public interface AttributeSetBuilder extends Robolectric.AttributeSetBuilder
Builder of AttributeSets.
| Modifier and Type | Method and Description |
|---|---|
AttributeSetBuilder |
addAttribute(int resId,
java.lang.String value)
Set an attribute to the given value.
|
android.util.AttributeSet |
build()
Build an
AttributeSet with the antecedent attributes. |
AttributeSetBuilder |
setClassAttribute(java.lang.String value)
Set the class attribute to the given value.
|
AttributeSetBuilder |
setIdAttribute(java.lang.String value)
Set the id attribute to the given value.
|
AttributeSetBuilder |
setStyleAttribute(java.lang.String value)
Set the style attribute to the given value.
|
AttributeSetBuilder addAttribute(@IdRes int resId, java.lang.String value)
Set an attribute to the given value.
The value will be interpreted according to the attribute’s format.
addAttribute in interface Robolectric.AttributeSetBuilderresId - The attribute resource id to set.value - The value to set.AttributeSetBuilder.AttributeSetBuilder setStyleAttribute(java.lang.String value)
Set the style attribute to the given value.
The value will be interpreted as a resource reference.
setStyleAttribute in interface Robolectric.AttributeSetBuildervalue - The value for the specified attribute in this AttributeSet.AttributeSetBuilder.AttributeSetBuilder setClassAttribute(java.lang.String value)
Set the class attribute to the given value.
The value will be interpreted as a class name.
value - The value for this AttributeSet’s class attribute.AttributeSetBuilder.AttributeSetBuilder setIdAttribute(java.lang.String value)
Set the id attribute to the given value.
The value will be interpreted as an element id name.
value - The value for this AttributeSet’s id attribute.AttributeSetBuilder.android.util.AttributeSet build()
Build an AttributeSet with the antecedent attributes.
build in interface Robolectric.AttributeSetBuilderAttributeSet.