Package org.robolectric.android
Interface AttributeSetBuilder
- All Superinterfaces:
Robolectric.AttributeSetBuilder
- All Known Implementing Classes:
AttributeSetBuilderImpl
Deprecated.
Builder of
AttributeSet
s.-
Method Summary
Modifier and TypeMethodDescriptionaddAttribute
(int resId, String value) Deprecated.Set an attribute to the given value.build()
Deprecated.Build anAttributeSet
with the antecedent attributes.setClassAttribute
(String value) Deprecated.Set the class attribute to the given value.setIdAttribute
(String value) Deprecated.Set the id attribute to the given value.setStyleAttribute
(String value) Deprecated.Set the style attribute to the given value.
-
Method Details
-
addAttribute
Deprecated.Set an attribute to the given value.The value will be interpreted according to the attribute's format.
- Specified by:
addAttribute
in interfaceRobolectric.AttributeSetBuilder
- Parameters:
resId
- The attribute resource id to set.value
- The value to set.- Returns:
- This
AttributeSetBuilder
.
-
setStyleAttribute
Deprecated.Set the style attribute to the given value.The value will be interpreted as a resource reference.
- Specified by:
setStyleAttribute
in interfaceRobolectric.AttributeSetBuilder
- Parameters:
value
- The value for the specified attribute in thisAttributeSet
.- Returns:
- This
AttributeSetBuilder
.
-
setClassAttribute
Deprecated.Set the class attribute to the given value.The value will be interpreted as a class name.
- Parameters:
value
- The value for thisAttributeSet
'sclass
attribute.- Returns:
- This
AttributeSetBuilder
.
-
setIdAttribute
Deprecated.Set the id attribute to the given value.The value will be interpreted as an element id name.
- Parameters:
value
- The value for thisAttributeSet
'sid
attribute.- Returns:
- This
AttributeSetBuilder
.
-
build
AttributeSet build()Deprecated.Build anAttributeSet
with the antecedent attributes.- Specified by:
build
in interfaceRobolectric.AttributeSetBuilder
- Returns:
- A new
AttributeSet
.
-
Xml.asAttributeSet(XmlPullParser)
instead. Not supported inResourcesMode.Mode.NATIVE