Code example for LayerDrawable

0
    	Document xmlDoc = documents.get( resourceExtractor.getResourceName( resId ) );
    	NodeList nodes = xmlDoc.getElementsByTagName("selector");
    	if( nodes != null && nodes.getLength() > 0 ) { return buildStateListDrawable( xmlDoc ); } 
 
    	nodes = xmlDoc.getElementsByTagName("layer-list");
    	if( nodes != null && nodes.getLength() > 0 ) { return new LayerDrawable( null ); }    	
 
    	return null; 
    } 
     
    /** 
     * Store document locally keyed by resource name. 
     *  
     * @param xmlFile 
     *            Xml file 
     * @param document 
     *            Document 
     * @param isSystem 
     *            System resource 
     * @throws Exception 
     * @see com.xtremelabs.robolectric.res.XmlLoader#processResourceXml(java.io.File,