|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.util.XmlPullAttributes
class XmlPullAttributes
Provides an implementation of AttributeSet on top of an XmlPullParser.
| Constructor Summary | |
|---|---|
XmlPullAttributes(XmlPullParser parser)
|
|
| Method Summary | |
|---|---|
boolean |
getAttributeBooleanValue(int index,
boolean defaultValue)
Return the boolean value of attribute at 'index'. |
boolean |
getAttributeBooleanValue(String namespace,
String attribute,
boolean defaultValue)
Return the boolean value of 'attribute'. |
int |
getAttributeCount()
|
float |
getAttributeFloatValue(int index,
float defaultValue)
Return the float value of attribute at 'index'. |
float |
getAttributeFloatValue(String namespace,
String attribute,
float defaultValue)
Return the float value of 'attribute'. |
int |
getAttributeIntValue(int index,
int defaultValue)
Return the integer value of attribute at 'index'. |
int |
getAttributeIntValue(String namespace,
String attribute,
int defaultValue)
Return the integer value of 'attribute'. |
int |
getAttributeListValue(int index,
String[] options,
int defaultValue)
Return the index of the value of attribute at 'index' in the list 'options'. |
int |
getAttributeListValue(String namespace,
String attribute,
String[] options,
int defaultValue)
Return the index of the value of 'attribute' in the list 'options'. |
String |
getAttributeName(int index)
|
int |
getAttributeNameResource(int index)
Return the resource ID associated with the given attribute name. |
int |
getAttributeResourceValue(int index,
int defaultValue)
Return the value of attribute at 'index' as a resource identifier. |
int |
getAttributeResourceValue(String namespace,
String attribute,
int defaultValue)
Return the value of 'attribute' as a resource identifier. |
int |
getAttributeUnsignedIntValue(int index,
int defaultValue)
Return the integer value of attribute at 'index' that is formatted as an unsigned value. |
int |
getAttributeUnsignedIntValue(String namespace,
String attribute,
int defaultValue)
Return the boolean value of 'attribute' that is formatted as an unsigned value. |
String |
getAttributeValue(int index)
|
String |
getAttributeValue(String namespace,
String name)
|
String |
getClassAttribute()
Return the value of the "class" attribute or null if there is not one. |
String |
getIdAttribute()
Return the value of the "id" attribute or null if there is not one. |
int |
getIdAttributeResourceValue(int defaultValue)
Return the integer value of the "id" attribute or defaultValue if there is none. |
String |
getPositionDescription()
|
int |
getStyleAttribute()
Return the value of the "style" attribute or 0 if there is not one. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlPullAttributes(XmlPullParser parser)
| Method Detail |
|---|
public int getAttributeCount()
getAttributeCount in interface AttributeSetpublic String getAttributeName(int index)
getAttributeName in interface AttributeSetpublic String getAttributeValue(int index)
getAttributeValue in interface AttributeSet
public String getAttributeValue(String namespace,
String name)
getAttributeValue in interface AttributeSetpublic String getPositionDescription()
getPositionDescription in interface AttributeSetpublic int getAttributeNameResource(int index)
AttributeSetNote that this is different than AttributeSet.getAttributeResourceValue(java.lang.String, java.lang.String, int)
in that it returns a resource identifier for the attribute name; the
other method returns this attribute's value as a resource identifier.
getAttributeNameResource in interface AttributeSetindex - Index of the desired attribute, 0...count-1.
public int getAttributeListValue(String namespace,
String attribute,
String[] options,
int defaultValue)
AttributeSet
getAttributeListValue in interface AttributeSetattribute - Name of attribute to retrieve.options - List of strings whose values we are checking against.defaultValue - Value returned if attribute doesn't exist or no
match is found.
public boolean getAttributeBooleanValue(String namespace,
String attribute,
boolean defaultValue)
AttributeSet
getAttributeBooleanValue in interface AttributeSetattribute - The attribute to retrieve.defaultValue - What to return if the attribute isn't found.
public int getAttributeResourceValue(String namespace,
String attribute,
int defaultValue)
AttributeSetNote that this is different than AttributeSet.getAttributeNameResource(int)
in that it returns a the value contained in this attribute as a
resource identifier (i.e., a value originally of the form
"@package:type/resource"); the other method returns a resource
identifier that identifies the name of the attribute.
getAttributeResourceValue in interface AttributeSetattribute - The attribute to retrieve.defaultValue - What to return if the attribute isn't found.
public int getAttributeIntValue(String namespace,
String attribute,
int defaultValue)
AttributeSet
getAttributeIntValue in interface AttributeSetattribute - The attribute to retrieve.defaultValue - What to return if the attribute isn't found.
public int getAttributeUnsignedIntValue(String namespace,
String attribute,
int defaultValue)
AttributeSet
getAttributeUnsignedIntValue in interface AttributeSetattribute - The attribute to retrieve.defaultValue - What to return if the attribute isn't found.
public float getAttributeFloatValue(String namespace,
String attribute,
float defaultValue)
AttributeSet
getAttributeFloatValue in interface AttributeSetattribute - The attribute to retrieve.defaultValue - What to return if the attribute isn't found.
public int getAttributeListValue(int index,
String[] options,
int defaultValue)
AttributeSet
getAttributeListValue in interface AttributeSetindex - Index of the desired attribute, 0...count-1.options - List of strings whose values we are checking against.defaultValue - Value returned if attribute doesn't exist or no
match is found.
public boolean getAttributeBooleanValue(int index,
boolean defaultValue)
AttributeSet
getAttributeBooleanValue in interface AttributeSetindex - Index of the desired attribute, 0...count-1.defaultValue - What to return if the attribute isn't found.
public int getAttributeResourceValue(int index,
int defaultValue)
AttributeSetNote that this is different than AttributeSet.getAttributeNameResource(int)
in that it returns a the value contained in this attribute as a
resource identifier (i.e., a value originally of the form
"@package:type/resource"); the other method returns a resource
identifier that identifies the name of the attribute.
getAttributeResourceValue in interface AttributeSetindex - Index of the desired attribute, 0...count-1.defaultValue - What to return if the attribute isn't found.
public int getAttributeIntValue(int index,
int defaultValue)
AttributeSet
getAttributeIntValue in interface AttributeSetindex - Index of the desired attribute, 0...count-1.defaultValue - What to return if the attribute isn't found.
public int getAttributeUnsignedIntValue(int index,
int defaultValue)
AttributeSet
getAttributeUnsignedIntValue in interface AttributeSetindex - Index of the desired attribute, 0...count-1.defaultValue - What to return if the attribute isn't found.
public float getAttributeFloatValue(int index,
float defaultValue)
AttributeSet
getAttributeFloatValue in interface AttributeSetindex - Index of the desired attribute, 0...count-1.defaultValue - What to return if the attribute isn't found.
public String getIdAttribute()
AttributeSet
getIdAttribute in interface AttributeSetpublic String getClassAttribute()
AttributeSet
getClassAttribute in interface AttributeSetpublic int getIdAttributeResourceValue(int defaultValue)
AttributeSet
getIdAttributeResourceValue in interface AttributeSetdefaultValue - What to return if the "id" attribute isn't found.
public int getStyleAttribute()
AttributeSet
getStyleAttribute in interface AttributeSet
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||