Loading core/java/android/util/AttributeSet.java +56 −14 Original line number Diff line number Diff line Loading @@ -56,10 +56,53 @@ package android.util; * identifier associated with a particular XML attribute name. */ public interface AttributeSet { /** * Returns the number of attributes available in the set. * * @return A positive integer, or 0 if the set is empty. */ public int getAttributeCount(); /** * Returns the name of the specified attribute. * * @param index Index of the desired attribute, 0...count-1. * * @return A String containing the name of the attribute, or null if the * attribute cannot be found. */ public String getAttributeName(int index); /** * Returns the value of the specified attribute as a string representation. * * @param index Index of the desired attribute, 0...count-1. * * @return A String containing the value of the attribute, or null if the * attribute cannot be found. */ public String getAttributeValue(int index); /** * Returns the value of the specified attribute as a string representation. * The lookup is performed using the attribute name. * * @param namespace The namespace of the attribute to get the value from. * @param name The name of the attribute to get the value from. * * @return A String containing the value of the attribute, or null if the * attribute cannot be found. */ public String getAttributeValue(String namespace, String name); /** * Returns a description of the current position of the attribute set. * For instance, if the attribute set is loaded from an XML document, * the position description could indicate the current line number. * * @return A string representation of the current position in the set, * may be null. */ public String getPositionDescription(); /** Loading @@ -81,6 +124,7 @@ public interface AttributeSet { /** * Return the index of the value of 'attribute' in the list 'options'. * * @param namespace Namespace of attribute to retrieve. * @param attribute Name of attribute to retrieve. * @param options List of strings whose values we are checking against. * @param defaultValue Value returned if attribute doesn't exist or no Loading @@ -94,6 +138,7 @@ public interface AttributeSet { /** * Return the boolean value of 'attribute'. * * @param namespace Namespace of attribute to retrieve. * @param attribute The attribute to retrieve. * @param defaultValue What to return if the attribute isn't found. * Loading @@ -111,6 +156,7 @@ public interface AttributeSet { * "@package:type/resource"); the other method returns a resource * identifier that identifies the name of the attribute. * * @param namespace Namespace of attribute to retrieve. * @param attribute The attribute to retrieve. * @param defaultValue What to return if the attribute isn't found. * Loading @@ -122,6 +168,7 @@ public interface AttributeSet { /** * Return the integer value of 'attribute'. * * @param namespace Namespace of attribute to retrieve. * @param attribute The attribute to retrieve. * @param defaultValue What to return if the attribute isn't found. * Loading @@ -135,6 +182,7 @@ public interface AttributeSet { * unsigned value. In particular, the formats 0xn...n and #n...n are * handled. * * @param namespace Namespace of attribute to retrieve. * @param attribute The attribute to retrieve. * @param defaultValue What to return if the attribute isn't found. * Loading @@ -146,6 +194,7 @@ public interface AttributeSet { /** * Return the float value of 'attribute'. * * @param namespace Namespace of attribute to retrieve. * @param attribute The attribute to retrieve. * @param defaultValue What to return if the attribute isn't found. * Loading @@ -165,8 +214,7 @@ public interface AttributeSet { * * @return Index in to 'options' or defaultValue. */ public int getAttributeListValue(int index, String[] options, int defaultValue); public int getAttributeListValue(int index, String[] options, int defaultValue); /** * Return the boolean value of attribute at 'index'. Loading @@ -176,8 +224,7 @@ public interface AttributeSet { * * @return Resulting value. */ public boolean getAttributeBooleanValue(int index, boolean defaultValue); public boolean getAttributeBooleanValue(int index, boolean defaultValue); /** * Return the value of attribute at 'index' as a resource identifier. Loading @@ -193,8 +240,7 @@ public interface AttributeSet { * * @return Resulting value. */ public int getAttributeResourceValue(int index, int defaultValue); public int getAttributeResourceValue(int index, int defaultValue); /** * Return the integer value of attribute at 'index'. Loading @@ -204,8 +250,7 @@ public interface AttributeSet { * * @return Resulting value. */ public int getAttributeIntValue(int index, int defaultValue); public int getAttributeIntValue(int index, int defaultValue); /** * Return the integer value of attribute at 'index' that is formatted as an Loading @@ -217,8 +262,7 @@ public interface AttributeSet { * * @return Resulting value. */ public int getAttributeUnsignedIntValue(int index, int defaultValue); public int getAttributeUnsignedIntValue(int index, int defaultValue); /** * Return the float value of attribute at 'index'. Loading @@ -228,8 +272,7 @@ public interface AttributeSet { * * @return Resulting value. */ public float getAttributeFloatValue(int index, float defaultValue); public float getAttributeFloatValue(int index, float defaultValue); /** * Return the value of the "id" attribute or null if there is not one. Loading Loading @@ -266,4 +309,3 @@ public interface AttributeSet { */ public int getStyleAttribute(); } Loading
core/java/android/util/AttributeSet.java +56 −14 Original line number Diff line number Diff line Loading @@ -56,10 +56,53 @@ package android.util; * identifier associated with a particular XML attribute name. */ public interface AttributeSet { /** * Returns the number of attributes available in the set. * * @return A positive integer, or 0 if the set is empty. */ public int getAttributeCount(); /** * Returns the name of the specified attribute. * * @param index Index of the desired attribute, 0...count-1. * * @return A String containing the name of the attribute, or null if the * attribute cannot be found. */ public String getAttributeName(int index); /** * Returns the value of the specified attribute as a string representation. * * @param index Index of the desired attribute, 0...count-1. * * @return A String containing the value of the attribute, or null if the * attribute cannot be found. */ public String getAttributeValue(int index); /** * Returns the value of the specified attribute as a string representation. * The lookup is performed using the attribute name. * * @param namespace The namespace of the attribute to get the value from. * @param name The name of the attribute to get the value from. * * @return A String containing the value of the attribute, or null if the * attribute cannot be found. */ public String getAttributeValue(String namespace, String name); /** * Returns a description of the current position of the attribute set. * For instance, if the attribute set is loaded from an XML document, * the position description could indicate the current line number. * * @return A string representation of the current position in the set, * may be null. */ public String getPositionDescription(); /** Loading @@ -81,6 +124,7 @@ public interface AttributeSet { /** * Return the index of the value of 'attribute' in the list 'options'. * * @param namespace Namespace of attribute to retrieve. * @param attribute Name of attribute to retrieve. * @param options List of strings whose values we are checking against. * @param defaultValue Value returned if attribute doesn't exist or no Loading @@ -94,6 +138,7 @@ public interface AttributeSet { /** * Return the boolean value of 'attribute'. * * @param namespace Namespace of attribute to retrieve. * @param attribute The attribute to retrieve. * @param defaultValue What to return if the attribute isn't found. * Loading @@ -111,6 +156,7 @@ public interface AttributeSet { * "@package:type/resource"); the other method returns a resource * identifier that identifies the name of the attribute. * * @param namespace Namespace of attribute to retrieve. * @param attribute The attribute to retrieve. * @param defaultValue What to return if the attribute isn't found. * Loading @@ -122,6 +168,7 @@ public interface AttributeSet { /** * Return the integer value of 'attribute'. * * @param namespace Namespace of attribute to retrieve. * @param attribute The attribute to retrieve. * @param defaultValue What to return if the attribute isn't found. * Loading @@ -135,6 +182,7 @@ public interface AttributeSet { * unsigned value. In particular, the formats 0xn...n and #n...n are * handled. * * @param namespace Namespace of attribute to retrieve. * @param attribute The attribute to retrieve. * @param defaultValue What to return if the attribute isn't found. * Loading @@ -146,6 +194,7 @@ public interface AttributeSet { /** * Return the float value of 'attribute'. * * @param namespace Namespace of attribute to retrieve. * @param attribute The attribute to retrieve. * @param defaultValue What to return if the attribute isn't found. * Loading @@ -165,8 +214,7 @@ public interface AttributeSet { * * @return Index in to 'options' or defaultValue. */ public int getAttributeListValue(int index, String[] options, int defaultValue); public int getAttributeListValue(int index, String[] options, int defaultValue); /** * Return the boolean value of attribute at 'index'. Loading @@ -176,8 +224,7 @@ public interface AttributeSet { * * @return Resulting value. */ public boolean getAttributeBooleanValue(int index, boolean defaultValue); public boolean getAttributeBooleanValue(int index, boolean defaultValue); /** * Return the value of attribute at 'index' as a resource identifier. Loading @@ -193,8 +240,7 @@ public interface AttributeSet { * * @return Resulting value. */ public int getAttributeResourceValue(int index, int defaultValue); public int getAttributeResourceValue(int index, int defaultValue); /** * Return the integer value of attribute at 'index'. Loading @@ -204,8 +250,7 @@ public interface AttributeSet { * * @return Resulting value. */ public int getAttributeIntValue(int index, int defaultValue); public int getAttributeIntValue(int index, int defaultValue); /** * Return the integer value of attribute at 'index' that is formatted as an Loading @@ -217,8 +262,7 @@ public interface AttributeSet { * * @return Resulting value. */ public int getAttributeUnsignedIntValue(int index, int defaultValue); public int getAttributeUnsignedIntValue(int index, int defaultValue); /** * Return the float value of attribute at 'index'. Loading @@ -228,8 +272,7 @@ public interface AttributeSet { * * @return Resulting value. */ public float getAttributeFloatValue(int index, float defaultValue); public float getAttributeFloatValue(int index, float defaultValue); /** * Return the value of the "id" attribute or null if there is not one. Loading Loading @@ -266,4 +309,3 @@ public interface AttributeSet { */ public int getStyleAttribute(); }