IT. Expert System.

Android Reference

BridgeXmlPullAttributes


android.util

Class BridgeXmlPullAttributes

  • All Implemented Interfaces:
    AttributeSet


    public class BridgeXmlPullAttributes
    extends Object
    A correct implementation of the AttributeSet interface on top of a XmlPullParser
    • Constructor Detail

      • BridgeXmlPullAttributes

        public BridgeXmlPullAttributes(XmlPullParser parser,
                               com.android.layoutlib.bridge.android.BridgeContext context,
                               boolean platformFile)
    • Method Detail

      • getAttributeNameResource

        public int getAttributeNameResource(int index)
        Description copied from interface: AttributeSet
        Return the resource ID associated with the given attribute name. This will be the identifier for an attribute resource, which can be used by styles. Returns 0 if there is no resource associated with this attribute.

        Note 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.

        Specified by:
        getAttributeNameResource in interface AttributeSet
        Parameters:
        index - Index of the desired attribute, 0...count-1.
        Returns:
        The resource identifier, 0 if none.
      • getAttributeListValue

        public int getAttributeListValue(String namespace,
                                String attribute,
                                String[] options,
                                int defaultValue)
        Description copied from interface: AttributeSet
        Return the index of the value of 'attribute' in the list 'options'.
        Specified by:
        getAttributeListValue in interface AttributeSet
        Parameters:
        namespace - Namespace of attribute to retrieve.
        attribute - 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.
        Returns:
        Index in to 'options' or defaultValue.
      • getAttributeBooleanValue

        public boolean getAttributeBooleanValue(String namespace,
                                       String attribute,
                                       boolean defaultValue)
        Description copied from interface: AttributeSet
        Return the boolean value of 'attribute'.
        Specified by:
        getAttributeBooleanValue in interface AttributeSet
        Parameters:
        namespace - Namespace of attribute to retrieve.
        attribute - The attribute to retrieve.
        defaultValue - What to return if the attribute isn't found.
        Returns:
        Resulting value.
      • getAttributeResourceValue

        public int getAttributeResourceValue(String namespace,
                                    String attribute,
                                    int defaultValue)
        Description copied from interface: AttributeSet
        Return the value of 'attribute' as a resource identifier.

        Note 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.

        Specified by:
        getAttributeResourceValue in interface AttributeSet
        Parameters:
        namespace - Namespace of attribute to retrieve.
        attribute - The attribute to retrieve.
        defaultValue - What to return if the attribute isn't found.
        Returns:
        Resulting value.
      • getAttributeIntValue

        public int getAttributeIntValue(String namespace,
                               String attribute,
                               int defaultValue)
        Description copied from interface: AttributeSet
        Return the integer value of 'attribute'.
        Specified by:
        getAttributeIntValue in interface AttributeSet
        Parameters:
        namespace - Namespace of attribute to retrieve.
        attribute - The attribute to retrieve.
        defaultValue - What to return if the attribute isn't found.
        Returns:
        Resulting value.
      • getAttributeUnsignedIntValue

        public int getAttributeUnsignedIntValue(String namespace,
                                       String attribute,
                                       int defaultValue)
        Description copied from interface: AttributeSet
        Return the boolean value of 'attribute' that is formatted as an unsigned value. In particular, the formats 0xn...n and #n...n are handled.
        Specified by:
        getAttributeUnsignedIntValue in interface AttributeSet
        Parameters:
        namespace - Namespace of attribute to retrieve.
        attribute - The attribute to retrieve.
        defaultValue - What to return if the attribute isn't found.
        Returns:
        Resulting value.
      • getAttributeFloatValue

        public float getAttributeFloatValue(String namespace,
                                   String attribute,
                                   float defaultValue)
        Description copied from interface: AttributeSet
        Return the float value of 'attribute'.
        Specified by:
        getAttributeFloatValue in interface AttributeSet
        Parameters:
        namespace - Namespace of attribute to retrieve.
        attribute - The attribute to retrieve.
        defaultValue - What to return if the attribute isn't found.
        Returns:
        Resulting value.
      • getAttributeListValue

        public int getAttributeListValue(int index,
                                String[] options,
                                int defaultValue)
        Description copied from interface: AttributeSet
        Return the index of the value of attribute at 'index' in the list 'options'.
        Specified by:
        getAttributeListValue in interface AttributeSet
        Parameters:
        index - 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.
        Returns:
        Index in to 'options' or defaultValue.
      • getAttributeBooleanValue

        public boolean getAttributeBooleanValue(int index,
                                       boolean defaultValue)
        Description copied from interface: AttributeSet
        Return the boolean value of attribute at 'index'.
        Specified by:
        getAttributeBooleanValue in interface AttributeSet
        Parameters:
        index - Index of the desired attribute, 0...count-1.
        defaultValue - What to return if the attribute isn't found.
        Returns:
        Resulting value.
      • getAttributeResourceValue

        public int getAttributeResourceValue(int index,
                                    int defaultValue)
        Description copied from interface: AttributeSet
        Return the value of attribute at 'index' as a resource identifier.

        Note 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.

        Specified by:
        getAttributeResourceValue in interface AttributeSet
        Parameters:
        index - Index of the desired attribute, 0...count-1.
        defaultValue - What to return if the attribute isn't found.
        Returns:
        Resulting value.
      • getAttributeIntValue

        public int getAttributeIntValue(int index,
                               int defaultValue)
        Description copied from interface: AttributeSet
        Return the integer value of attribute at 'index'.
        Specified by:
        getAttributeIntValue in interface AttributeSet
        Parameters:
        index - Index of the desired attribute, 0...count-1.
        defaultValue - What to return if the attribute isn't found.
        Returns:
        Resulting value.
      • getAttributeUnsignedIntValue

        public int getAttributeUnsignedIntValue(int index,
                                       int defaultValue)
        Description copied from interface: AttributeSet
        Return the integer value of attribute at 'index' that is formatted as an unsigned value. In particular, the formats 0xn...n and #n...n are handled.
        Specified by:
        getAttributeUnsignedIntValue in interface AttributeSet
        Parameters:
        index - Index of the desired attribute, 0...count-1.
        defaultValue - What to return if the attribute isn't found.
        Returns:
        Resulting value.
      • getAttributeFloatValue

        public float getAttributeFloatValue(int index,
                                   float defaultValue)
        Description copied from interface: AttributeSet
        Return the float value of attribute at 'index'.
        Specified by:
        getAttributeFloatValue in interface AttributeSet
        Parameters:
        index - Index of the desired attribute, 0...count-1.
        defaultValue - What to return if the attribute isn't found.
        Returns:
        Resulting value.
      • getAttributeCount

        public int getAttributeCount()
        Description copied from interface: AttributeSet
        Returns the number of attributes available in the set.
        Specified by:
        getAttributeCount in interface AttributeSet
        Returns:
        A positive integer, or 0 if the set is empty.
      • getAttributeName

        public String getAttributeName(int index)
        Description copied from interface: AttributeSet
        Returns the name of the specified attribute.
        Specified by:
        getAttributeName in interface AttributeSet
        Parameters:
        index - Index of the desired attribute, 0...count-1.
        Returns:
        A String containing the name of the attribute, or null if the attribute cannot be found.
      • getAttributeValue

        public String getAttributeValue(int index)
        Description copied from interface: AttributeSet
        Returns the value of the specified attribute as a string representation.
        Specified by:
        getAttributeValue in interface AttributeSet
        Parameters:
        index - Index of the desired attribute, 0...count-1.
        Returns:
        A String containing the value of the attribute, or null if the attribute cannot be found.
      • getAttributeValue

        public String getAttributeValue(String namespace,
                               String name)
        Description copied from interface: AttributeSet
        Returns the value of the specified attribute as a string representation. The lookup is performed using the attribute name.
        Specified by:
        getAttributeValue in interface AttributeSet
        Parameters:
        namespace - The namespace of the attribute to get the value from.
        name - The name of the attribute to get the value from.
        Returns:
        A String containing the value of the attribute, or null if the attribute cannot be found.
      • getPositionDescription

        public String getPositionDescription()
        Description copied from interface: AttributeSet
        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.
        Specified by:
        getPositionDescription in interface AttributeSet
        Returns:
        A string representation of the current position in the set, may be null.
      • getIdAttribute

        public String getIdAttribute()
        Description copied from interface: AttributeSet
        Return the value of the "id" attribute or null if there is not one. Equivalent to getAttributeValue(null, "id").
        Specified by:
        getIdAttribute in interface AttributeSet
        Returns:
        The id attribute's value or null.
      • getClassAttribute

        public String getClassAttribute()
        Description copied from interface: AttributeSet
        Return the value of the "class" attribute or null if there is not one. Equivalent to getAttributeValue(null, "class").
        Specified by:
        getClassAttribute in interface AttributeSet
        Returns:
        The class attribute's value or null.
      • getIdAttributeResourceValue

        public int getIdAttributeResourceValue(int defaultValue)
        Description copied from interface: AttributeSet
        Return the integer value of the "id" attribute or defaultValue if there is none. Equivalent to getAttributeResourceValue(null, "id", defaultValue);
        Specified by:
        getIdAttributeResourceValue in interface AttributeSet
        Parameters:
        defaultValue - What to return if the "id" attribute isn't found.
        Returns:
        int Resulting value.
      • getStyleAttribute

        public int getStyleAttribute()
        Description copied from interface: AttributeSet
        Return the value of the "style" attribute or 0 if there is not one. Equivalent to getAttributeResourceValue(null, "style").
        Specified by:
        getStyleAttribute in interface AttributeSet
        Returns:
        The style attribute's resource identifier or 0.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 514 / 158861787. Delta: 0.03666 с