Code example for LayerDrawable

Methods: getDrawablesetLayerInset

0
 
		int l = level * shiftSize;
		int r = 0;
		int t = 0;
		int b = 0;
		pieceDrawable.setLayerInset(level, l, t, r, b);
		((BitmapDrawable) pieceDrawable.getDrawable(level)).setGravity(Gravity.LEFT | Gravity.TOP);
	} 
 
	public void dropAlivePieces(){ 
		for (int i = 0, cnt = whiteAlivePiecesCount.length; i < cnt; i++) {
			whiteAlivePiecesCount[i] = 0;
		} 
 
		for (int i = 0, cnt = blackAlivePiecesCount.length; i < cnt; i++) {
			blackAlivePiecesCount[i] = 0;
		} 
	} 
 
	public void addAlivePiece(boolean isWhite, int pieceId) {
Stop searching for code, let great code find you!  Add Codota to your java IDE