* Container for a dynamically typed data value. Primarily used with
* {@link android.content.res.Resources} for holding resource values.
*/
public class TypedValue {
}
/**
* Return the raw data associated with a particular resource ID.
*
* @param id The desired resource identifier, as generated by the aapt
* tool. This integer encodes the package, type, and resource
* entry. The value 0 is an invalid identifier.
* @param outValue Object in which to place the resource data.
* @param resolveRefs If true, a resource that is a reference to another
* resource will be followed so that you receive the
* actual final resource data. If false, the TypedValue
* will be filled in with the reference itself.
*
* @throws NotFoundException Throws NotFoundException if the given ID does not exist.
*
*/
public void getValue(int id, TypedValue outValue, boolean resolveRefs)
throws NotFoundException {
boolean found = mAssets.getResourceValue(id, 0, outValue, resolveRefs);
if (found) {
return;
}
throw new NotFoundException("Resource ID #0x"
+ Integer.toHexString(id));
}