本文整理了Java中android.graphics.Bitmap.getGenerationId()
方法的一些代码示例,展示了Bitmap.getGenerationId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bitmap.getGenerationId()
方法的具体详情如下:
包路径:android.graphics.Bitmap
类名称:Bitmap
方法名:getGenerationId
暂无
代码示例来源:origin: wasdennnoch/AndroidN-ify
Pair<Boolean, Integer> cached = mGrayscaleBitmapCache.get(bitmap);
if (cached != null) {
if (cached.second == bitmap.getGenerationId()) {
return cached.first;
generationId = bitmap.getGenerationId();
代码示例来源:origin: jbruchanov/AnUitor
@Override
protected HashMap<String, Object> fillValues(Bitmap b, HashMap<String, Object> data, HashMap<String, Object> contextData) {
data.put("DescribeContents", b.describeContents());
data.put("Config", String.valueOf(b.getConfig()));
data.put("Density", b.getDensity());
data.put("Height", b.getHeight());
data.put("NinePatchChunk", Arrays.toString(b.getNinePatchChunk()));
data.put("RowBytes", b.getRowBytes());
data.put("Width", b.getWidth());
data.put("HasAlpha", b.hasAlpha());
data.put("IsMutable", b.isMutable());
data.put("IsRecycled", b.isRecycled());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
data.put("AllocationByteCount", b.getAllocationByteCount());
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {
data.put("ByteCount", b.getByteCount());
data.put("GenerationId", b.getGenerationId());
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
data.put("HasMipMap", b.hasMipMap());
data.put("IsPremultiplied", b.isPremultiplied());
}
return data;
}
}
内容来源于网络,如有侵权,请联系作者删除!