Code examples for LayerDrawable

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
336:	LayerDrawable ld = new LayerDrawable(new Drawable[]{item0, item1}); 
337:	ld.setLayerInset(1, dipToInt(4f), dipToInt(1f), dipToInt(4f), dipToInt(1f)); 
Full Snippet Info
7
CodeRank
792:	LayerDrawable d = new LayerDrawable(array); 
793:	d.setLayerInset(1, 1, 1, 1, 1); 
794:	d.setLayerInset(2, 2, 2, 2, 2); 
Full Snippet Info
6
CodeRank
197:	LayerDrawable d = new LayerDrawable(array); 
198:	d.setLayerInset(1, 1, 1, 1, 1); 
199:	d.setLayerInset(2, 2, 2, 2, 2); 
Full Snippet Info
6
CodeRank
55:	progressLayerDrawable.setId(1, android.R.id.secondaryProgress); 
56:	progressLayerDrawable.setId(2, android.R.id.progress); 
57:	 
58:	//Copy the existing ProgressDrawable bounds to the new one. 
Full Snippet Info
6
CodeRank
148:	return new LayerDrawable(layers); 
-
263:	drawable.setId(backgroundIndex, android.R.id.background); 
-
265:	int w = drawable.getIntrinsicWidth(); 
266:	int h = drawable.getIntrinsicHeight(); 
267:	drawable.setBounds(0, 0, w, h); 
Full Snippet Info
5
CodeRank
153:	return new LayerDrawable(layers); 
Full Snippet Info
5
CodeRank
78:	if( nodes != null && nodes.getLength() > 0 ) { return new LayerDrawable( null ); } 
Full Snippet Info
5
CodeRank
19:	LayerDrawable ld = new LayerDrawable(new Drawable[] { 
-
23:	ld.setCallback(new Callback() { 
-
38:	ld.scheduleDrawable(ld, new Runnable() { 
Full Snippet Info
5
CodeRank
50:	final int width = layerDrawable.getBounds().right - layerDrawable.getBounds().left; 
-
55:	Drawable primaryProgressDrawable = layerDrawable.findDrawableByLayerId(android.R.id.progress); 
56:	Drawable secondaryProgressDrawable = layerDrawable.findDrawableByLayerId(android.R.id.secondaryProgress); 
Full Snippet Info
5
CodeRank
30:	addState(new int[] {attr.state_pressed}, new LayerDrawable(new Drawable[] {getHighlightDrawable(context)/*, unselectedPressed*/})); 
Full Snippet Info
5
CodeRank
82:	ld = new LayerDrawable( list ); 
83:	ld.setId( 0, android.R.id.background ); 
84:	ld.setId( 1, android.R.id.progress ); 
Full Snippet Info
5
CodeRank
86:	LayerDrawable layerDrawable = new LayerDrawable(layers); 
87:	layerDrawable.setLayerInset(0, 0, 0, 0, 0); 
88:	layerDrawable.setLayerInset(1, 0, 0, 0, 0); 
Full Snippet Info
5
CodeRank
792:	LayerDrawable d = new LayerDrawable(array); 
793:	d.setLayerInset(1, 1, 1, 1, 1); 
794:	d.setLayerInset(2, 2, 2, 2, 2); 
Full Snippet Info
5
CodeRank
148:	return new LayerDrawable(layers); 
-
263:	drawable.setId(backgroundIndex, android.R.id.background); 
-
265:	int w = drawable.getIntrinsicWidth(); 
266:	int h = drawable.getIntrinsicHeight(); 
267:	drawable.setBounds(0, 0, w, h); 
Full Snippet Info
5
CodeRank
145:	iconDrawable.getDrawable(0).setColorFilter( 
Full Snippet Info
5
CodeRank
236:	LayerDrawable layersList=new LayerDrawable(layers); 
-
242:	layersList.setLayerInset(backgroundLayerIndex,(drawLeftBorder?offsetPadding:0),0,0,offsetPadding); 
243:	layersList.setLayerInset(borderLayerIndex,0,0,0,(shadowSize)); 
Full Snippet Info
5
CodeRank
202:	LayerDrawable d = new LayerDrawable(array); 
203:	d.setLayerInset(1, 1, 1, 1, 1); 
204:	d.setLayerInset(2, 2, 2, 2, 2); 
Full Snippet Info
5
CodeRank
58:	if (visibleRoom > 0 && visibleRoom < layerDrawable.getNumberOfLayers()) { 
59:	layerDrawable.getDrawable(visibleRoom).setColorFilter(accentColor, Mode.SRC_ATOP); 
60:	layerDrawable.getDrawable(visibleRoom).setAlpha(180); 
Full Snippet Info
5
CodeRank
173:	LayerDrawable layerDrawable= new LayerDrawable(layers.<Drawable>toArray(new Drawable[layers.size()])); 
-
177:	layerDrawable.setLayerInset(BACKGROUND_LAYER,0,0,0,principalEdges); 
-
179:	layerDrawable.setLayerInset(IMAGE_LAYER,0,0,0,principalEdges); 
-
181:	layerDrawable.setLayerInset(BORDER_LAYER,0,0,0,((int)NOT_EXICITED_BOTTOM_BORDER_SHADOW_DPI)); 
Full Snippet Info
5
CodeRank