當前位置: 首頁>>代碼示例>>Java>>正文


Java Outline.isEmpty方法代碼示例

本文整理匯總了Java中android.graphics.Outline.isEmpty方法的典型用法代碼示例。如果您正苦於以下問題:Java Outline.isEmpty方法的具體用法?Java Outline.isEmpty怎麽用?Java Outline.isEmpty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.graphics.Outline的用法示例。


在下文中一共展示了Outline.isEmpty方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getOutline

import android.graphics.Outline; //導入方法依賴的package包/類
/**
 * Populates <code>outline</code> with the first available (non-empty) layer outline.
 *
 * @param outline Outline in which to place the first available layer outline
 */
@Override
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public void getOutline(@NonNull Outline outline) {
    final ChildDrawable[] array = mLayerState.mChildren;
    final int N = mLayerState.mNum;
    for (int i = 0; i < N; i++) {
        final Drawable dr = array[i].mDrawable;
        if (dr != null) {
            dr.getOutline(outline);
            if (!outline.isEmpty()) {
                return;
            }
        }
    }
}
 
開發者ID:ZieIony,項目名稱:Carbon,代碼行數:21,代碼來源:LayerDrawable.java

示例2: getOutline

import android.graphics.Outline; //導入方法依賴的package包/類
/**
 * Populates <code>outline</code> with the first available (non-empty) layer outline.
 *
 * @param outline Outline in which to place the first available layer outline
 */
@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;
        }
    }
}
 
開發者ID:ozodrukh,項目名稱:RippleDrawable,代碼行數:23,代碼來源:LayerDrawable.java

示例3: getOutline

import android.graphics.Outline; //導入方法依賴的package包/類
/**
 * Populates <code>outline</code> with the first available layer outline,
 * excluding the mask layer.
 *
 * @param outline Outline in which to place the first available layer outline
 */
@Override
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public void getOutline(@NonNull Outline outline) {
    final LayerState state = mLayerState;
    final ChildDrawable[] children = state.mChildren;
    final int N = state.mNum;
    for (int i = 0; i < N; i++) {
        if (children[i].mId != R.id.carbon_mask) {
            children[i].mDrawable.getOutline(outline);
            if (!outline.isEmpty()) return;
        }
    }
}
 
開發者ID:ZieIony,項目名稱:Carbon,代碼行數:20,代碼來源:RippleDrawableICS.java

示例4: getOutline

import android.graphics.Outline; //導入方法依賴的package包/類
/**
 * Populates <code>outline</code> with the first available layer outline,
 * excluding the mask layer.
 *
 * @param outline Outline in which to place the first available layer outline
 */
@Override
public void getOutline(@NonNull Outline outline) {
    final LayerState state = mLayerState;
    final ChildDrawable[] children = state.mChildren;
    final int N = state.mNum;
    for (int i = 0; i < N; i++) {
        if (children[i].mId != android.R.id.mask) {
            children[i].mDrawable.getOutline(outline);
            if (!outline.isEmpty()) return;
        }
    }
}
 
開發者ID:ozodrukh,項目名稱:RippleDrawable,代碼行數:19,代碼來源:RippleDrawable.java


注:本文中的android.graphics.Outline.isEmpty方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。