com.android.ide.common.rendering.api
Class DeclareStyleableResourceValue

java.lang.Object
  extended by com.android.ide.common.rendering.api.ResourceReference
      extended by com.android.ide.common.rendering.api.ResourceValue
          extended by com.android.ide.common.rendering.api.DeclareStyleableResourceValue
All Implemented Interfaces:
IResourceValue

public class DeclareStyleableResourceValue
extends ResourceValue

A Resource value representing a declare-styleable resource. ResourceValue.getValue() will return null, instead use getAllAttributes() to get the list of attributes defined in the declare-styleable.


Field Summary
 
Fields inherited from class com.android.ide.common.rendering.api.ResourceValue
mValue
 
Constructor Summary
DeclareStyleableResourceValue(ResourceType type, java.lang.String name, boolean isFramework)
           
 
Method Summary
 void addValue(AttrResourceValue attr)
           
 java.util.List<AttrResourceValue> getAllAttributes()
           
 java.util.Map<java.lang.String,java.lang.Integer> getAttributeValues(java.lang.String name)
          Deprecated. the method doesn't respect namespaces and is only present for older versions of LayoutLibs.
 
Methods inherited from class com.android.ide.common.rendering.api.ResourceValue
equals, getRawXmlValue, getResourceType, getType, getValue, hashCode, replaceWith, setValue, toString
 
Methods inherited from class com.android.ide.common.rendering.api.ResourceReference
getName, isFramework
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.android.layoutlib.api.IResourceValue
getName, isFramework
 

Constructor Detail

DeclareStyleableResourceValue

public DeclareStyleableResourceValue(@NonNull
                                     ResourceType type,
                                     @NonNull
                                     java.lang.String name,
                                     boolean isFramework)
Method Detail

getAttributeValues

@Deprecated
public java.util.Map<java.lang.String,java.lang.Integer> getAttributeValues(java.lang.String name)
Deprecated. the method doesn't respect namespaces and is only present for older versions of LayoutLibs.

Return the enum/flag integer value for a given attribute.

Parameters:
name - the name of the attribute
Returns:
the map of (name, integer) values.

getAllAttributes

@NonNull
public java.util.List<AttrResourceValue> getAllAttributes()

addValue

public void addValue(@NonNull
                     AttrResourceValue attr)