SingleResourceFilepublic class SingleResourceFile extends ResourceFile Represents a resource file describing a single resource.
This is typically an XML file inside res/anim, res/layout, or res/menu or an image file
under res/drawable. |
Fields Summary |
---|
private static final SAXParserFactory | sParserFactory | private static final Pattern | sXmlPattern | private static final Pattern[] | sDrawablePattern | private String | mResourceName | private com.android.ide.eclipse.common.resources.ResourceType | mType | private com.android.layoutlib.api.IResourceValue | mValue |
Constructors Summary |
---|
public SingleResourceFile(com.android.ide.eclipse.editors.resources.manager.files.IAbstractFile file, ResourceFolder folder)
super(file, folder);
// we need to infer the type of the resource from the folder type.
// This is easy since this is a single Resource file.
ResourceType[] types = FolderTypeRelationship.getRelatedResourceTypes(folder.getType());
mType = types[0];
// compute the resource name
mResourceName = getResourceName(mType);
mValue = new ResourceValue(mType.getName(), getResourceName(mType), file.getOsLocation(),
isFramework());
|
|