Example usage for android.graphics Outline isEmpty

List of usage examples for android.graphics Outline isEmpty

Introduction

In this page you can find the example usage for android.graphics Outline isEmpty.

Prototype

public boolean isEmpty() 

Source Link

Document

Returns whether the Outline is empty.

Usage

From source file:codetail.graphics.drawables.LayerDrawable.java

/**
 * Populates <code>outline</code> with the first available (non-empty) layer outline.
 *
 * @param outline Outline in which to place the first available layer outline
 *//*  w w w.j  ava 2  s.c o m*/
@Override
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public void getOutline(Outline outline) {
    if (!Android.isLollipop()) {
        return;
    }

    final LayerState state = mLayerState;
    final ChildDrawable[] children = state.mChildren;
    final int N = state.mNum;
    for (int i = 0; i < N; i++) {
        children[i].mDrawable.getOutline(outline);
        if (!outline.isEmpty()) {
            return;
        }
    }
}