Package org.robolectric.android
Interface AttributeSetBuilder
-
- All Superinterfaces:
Robolectric.AttributeSetBuilder
- All Known Implementing Classes:
AttributeSetBuilderImpl
public interface AttributeSetBuilder extends Robolectric.AttributeSetBuilder
Builder ofAttributeSets.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AttributeSetBuilderaddAttribute(int resId, String value)Set an attribute to the given value.AttributeSetbuild()Build anAttributeSetwith the antecedent attributes.AttributeSetBuildersetClassAttribute(String value)Set the class attribute to the given value.AttributeSetBuildersetIdAttribute(String value)Set the id attribute to the given value.AttributeSetBuildersetStyleAttribute(String value)Set the style attribute to the given value.
-
-
-
Method Detail
-
addAttribute
AttributeSetBuilder addAttribute(@IdRes int resId, String value)
Set an attribute to the given value. The value will be interpreted according to the attribute's format.- Specified by:
addAttributein interfaceRobolectric.AttributeSetBuilder- Parameters:
resId- The attribute resource id to set.value- The value to set.- Returns:
- This
AttributeSetBuilder.
-
setStyleAttribute
AttributeSetBuilder setStyleAttribute(String value)
Set the style attribute to the given value. The value will be interpreted as a resource reference.- Specified by:
setStyleAttributein interfaceRobolectric.AttributeSetBuilder- Parameters:
value- The value for the specified attribute in thisAttributeSet.- Returns:
- This
AttributeSetBuilder.
-
setClassAttribute
AttributeSetBuilder setClassAttribute(String value)
Set the class attribute to the given value. The value will be interpreted as a class name.- Parameters:
value- The value for thisAttributeSet'sclassattribute.- Returns:
- This
AttributeSetBuilder.
-
setIdAttribute
AttributeSetBuilder setIdAttribute(String value)
Set the id attribute to the given value. The value will be interpreted as an element id name.- Parameters:
value- The value for thisAttributeSet'sidattribute.- Returns:
- This
AttributeSetBuilder.
-
build
AttributeSet build()
Build anAttributeSetwith the antecedent attributes.- Specified by:
buildin interfaceRobolectric.AttributeSetBuilder- Returns:
- A new
AttributeSet.
-
-