Package org.robolectric.android
Class AttributeSetBuilderImpl
java.lang.Object
org.robolectric.android.AttributeSetBuilderImpl
- All Implemented Interfaces:
AttributeSetBuilder,Robolectric.AttributeSetBuilder
public class AttributeSetBuilderImpl extends Object implements AttributeSetBuilder
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAttributeSetBuilderImpl.ArscResourceResolverstatic classAttributeSetBuilderImpl.LegacyResourceResolverstatic interfaceAttributeSetBuilderImpl.ResourceResolver -
Constructor Summary
Constructors Modifier Constructor Description protectedAttributeSetBuilderImpl(AttributeSetBuilderImpl.ResourceResolver resourceResolver) -
Method Summary
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.
-
Constructor Details
-
Method Details
-
addAttribute
Description copied from interface:AttributeSetBuilderSet an attribute to the given value. The value will be interpreted according to the attribute's format.- Specified by:
addAttributein interfaceAttributeSetBuilder- Specified by:
addAttributein interfaceRobolectric.AttributeSetBuilder- Parameters:
resId- The attribute resource id to set.value- The value to set.- Returns:
- This
AttributeSetBuilder.
-
setStyleAttribute
Description copied from interface:AttributeSetBuilderSet the style attribute to the given value. The value will be interpreted as a resource reference.- Specified by:
setStyleAttributein interfaceAttributeSetBuilder- Specified by:
setStyleAttributein interfaceRobolectric.AttributeSetBuilder- Parameters:
value- The value for the specified attribute in thisAttributeSet.- Returns:
- This
AttributeSetBuilder.
-
setClassAttribute
Description copied from interface:AttributeSetBuilderSet the class attribute to the given value. The value will be interpreted as a class name.- Specified by:
setClassAttributein interfaceAttributeSetBuilder- Parameters:
value- The value for thisAttributeSet'sclassattribute.- Returns:
- This
AttributeSetBuilder.
-
setIdAttribute
Description copied from interface:AttributeSetBuilderSet the id attribute to the given value. The value will be interpreted as an element id name.- Specified by:
setIdAttributein interfaceAttributeSetBuilder- Parameters:
value- The value for thisAttributeSet'sidattribute.- Returns:
- This
AttributeSetBuilder.
-
build
Description copied from interface:AttributeSetBuilderBuild anAttributeSetwith the antecedent attributes.- Specified by:
buildin interfaceAttributeSetBuilder- Specified by:
buildin interfaceRobolectric.AttributeSetBuilder- Returns:
- A new
AttributeSet.
-