本文整理了Java中android.graphics.drawable.Drawable.resolveOpacity()
方法的一些代码示例,展示了Drawable.resolveOpacity()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Drawable.resolveOpacity()
方法的具体详情如下:
包路径:android.graphics.drawable.Drawable
类名称:Drawable
方法名:resolveOpacity
暂无
代码示例来源:origin: ZieIony/Carbon
final Drawable dr = array[i].mDrawable;
if (dr != null) {
op = Drawable.resolveOpacity(op, dr.getOpacity());
代码示例来源:origin: DreaminginCodeZH/MaterialProgressBar
/**
* @return the resolved opacity of all child drawables.
*/
public final int getOpacity() {
if (mCheckedOpacity) {
return mOpacity;
}
createAllFutures();
final int count = mNumChildren;
final Drawable[] drawables = mDrawables;
int op = (count > 0) ? drawables[0].getOpacity() : PixelFormat.TRANSPARENT;
for (int i = 1; i < count; i++) {
op = Drawable.resolveOpacity(op, drawables[i].getOpacity());
}
mOpacity = op;
mCheckedOpacity = true;
return op;
}
代码示例来源:origin: AlexMofer/ProjectX
@Override
public int getOpacity() {
if (mItems.isEmpty())
return PixelFormat.TRANSPARENT;
int op = mItems.get(0).getDrawable().getOpacity();
final int count = mItems.size();
for (int i = 1; i < count; i++) {
op = Drawable.resolveOpacity(op, mItems.get(i).getDrawable().getOpacity());
}
return op;
}
代码示例来源:origin: PrivacyApps/document-viewer
public final int getOpacity() {
if (mHaveOpacity) {
return mOpacity;
}
final int N = mNum;
final Rec[] array = mArray;
int op = N > 0 ? array[0].mDrawable.getOpacity() : PixelFormat.TRANSPARENT;
for (int i = 1; i < N; i++) {
op = Drawable.resolveOpacity(op, array[i].mDrawable.getOpacity());
}
mOpacity = op;
mHaveOpacity = true;
return op;
}
内容来源于网络,如有侵权,请联系作者删除!