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

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.TextResourceValue
All Implemented Interfaces:
IResourceValue

public class TextResourceValue
extends ResourceValue

A ResourceValue intended for text nodes where we need access to the raw XML text


Field Summary
 
Fields inherited from class com.android.ide.common.rendering.api.ResourceValue
mValue
 
Constructor Summary
TextResourceValue(ResourceType type, java.lang.String name, boolean isFramework)
           
TextResourceValue(ResourceType type, java.lang.String name, java.lang.String textValue, java.lang.String rawXmlValue, boolean isFramework)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getRawXmlValue()
          Similar to ResourceValue.getValue(), but returns the raw XML value.
 int hashCode()
           
 void setRawXmlValue(java.lang.String value)
           
 
Methods inherited from class com.android.ide.common.rendering.api.ResourceValue
getResourceType, getType, getValue, 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

TextResourceValue

public TextResourceValue(ResourceType type,
                         java.lang.String name,
                         boolean isFramework)

TextResourceValue

public TextResourceValue(ResourceType type,
                         java.lang.String name,
                         java.lang.String textValue,
                         java.lang.String rawXmlValue,
                         boolean isFramework)
Method Detail

getRawXmlValue

public java.lang.String getRawXmlValue()
Description copied from class: ResourceValue
Similar to ResourceValue.getValue(), but returns the raw XML value. This is usually the same as getValue, but with a few exceptions. For example, for markup strings, you can have * <string name="markup">This is <b>bold</b></string>. Here, ResourceValue.getValue() will return "This is bold" -- e.g. just the plain text flattened. However, this method will return "This is <b>bold</b>", which preserves the XML markup elements.

Overrides:
getRawXmlValue in class ResourceValue

setRawXmlValue

public void setRawXmlValue(java.lang.String value)

hashCode

public int hashCode()
Overrides:
hashCode in class ResourceValue

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class ResourceValue