本文整理了Java中android.view.View.getDrawingCacheBackgroundColor()
方法的一些代码示例,展示了View.getDrawingCacheBackgroundColor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。View.getDrawingCacheBackgroundColor()
方法的具体详情如下:
包路径:android.view.View
类名称:View
方法名:getDrawingCacheBackgroundColor
暂无
代码示例来源:origin: square/assertj-android
public S hasDrawingCacheBackgroundColor(int color) {
isNotNull();
int actualColor = actual.getDrawingCacheBackgroundColor();
assertThat(actualColor) //
.overridingErrorMessage("Expected drawing cache background color <%s> but was <%s>",
Integer.toHexString(color), Integer.toHexString(actualColor)) //
.isEqualTo(color);
return myself;
}
代码示例来源:origin: ImmortalZ/TransitionHelper
int color = view.getDrawingCacheBackgroundColor();
view.setDrawingCacheBackgroundColor(0);
float alpha = view.getAlpha();
代码示例来源:origin: gzu-liyujiang/AndroidPicker
view.setWillNotCacheDrawing(false);
int color = view.getDrawingCacheBackgroundColor();
代码示例来源:origin: stackoverflow.com
/**
* Draw the view into a bitmap.
*/
private Bitmap getViewBitmap(View v) {
v.clearFocus();
v.setPressed(false);
boolean willNotCache = v.willNotCacheDrawing();
v.setWillNotCacheDrawing(false);
// Reset the drawing cache background color to fully transparent
// for the duration of this operation
int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(0);
if (color != 0) {
v.destroyDrawingCache();
}
v.buildDrawingCache();
Bitmap cacheBitmap = v.getDrawingCache();
if (cacheBitmap == null) {
Log.e(TAG, "failed getViewBitmap(" + v + ")", new RuntimeException());
return null;
}
Bitmap bitmap = Bitmap.createBitmap(cacheBitmap);
// Restore the view
v.destroyDrawingCache();
v.setWillNotCacheDrawing(willNotCache);
v.setDrawingCacheBackgroundColor(color);
return bitmap;
}
代码示例来源:origin: jingle1267/android-utils
int color = view.getDrawingCacheBackgroundColor();
view.setDrawingCacheBackgroundColor(0);
if (color != 0) {
代码示例来源:origin: Blizzard-liu/AndroidUtils
int color = view.getDrawingCacheBackgroundColor();
view.setDrawingCacheBackgroundColor(0);
if (color != 0) {
代码示例来源:origin: com.squareup.assertj/assertj-android
public S hasDrawingCacheBackgroundColor(int color) {
isNotNull();
int actualColor = actual.getDrawingCacheBackgroundColor();
assertThat(actualColor) //
.overridingErrorMessage("Expected drawing cache background color <%s> but was <%s>",
Integer.toHexString(color), Integer.toHexString(actualColor)) //
.isEqualTo(color);
return myself;
}
代码示例来源:origin: geniusgithub/AndroidDialer
public void onClick(View view) {
mEST.setBackgroundColor(view.getDrawingCacheBackgroundColor());
if (mAlertDialog != null) {
mAlertDialog.setView(null);
mAlertDialog.dismiss();
mAlertDialog = null;
} else {
Log.e(TAG,
"--- buildAndShowColorDialogue: can't find alertDialog");
}
}
});
代码示例来源:origin: geniusgithub/AndroidDialer
public void onClick(View view) {
mEST.setItemColor(view.getDrawingCacheBackgroundColor());
if (mAlertDialog != null) {
mAlertDialog.setView(null);
mAlertDialog.dismiss();
mAlertDialog = null;
} else {
Log.e(TAG,
"--- buildAndShowColorDialogue: can't find alertDialog");
}
}
});
代码示例来源:origin: fookwood/Launcher3
int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(0);
float alpha = v.getAlpha();
代码示例来源:origin: WeAreFairphone/FP2-Launcher
int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(0);
float alpha = v.getAlpha();
代码示例来源:origin: gavinliu/SimpleOneStep
private Bitmap getViewBitmap(View v) {
v.clearFocus();
v.setPressed(false);
boolean willNotCache = v.willNotCacheDrawing();
v.setWillNotCacheDrawing(false);
int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(0);
if (color != 0) {
v.destroyDrawingCache();
}
v.buildDrawingCache();
Bitmap cacheBitmap = v.getDrawingCache();
if (cacheBitmap == null) {
return null;
}
Bitmap bitmap = Bitmap.createBitmap(cacheBitmap);
v.destroyDrawingCache();
v.setWillNotCacheDrawing(willNotCache);
v.setDrawingCacheBackgroundColor(color);
return bitmap;
}
代码示例来源:origin: stackoverflow.com
int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(0);
代码示例来源:origin: MichaelJokAr/retrofit-download-file
v.setWillNotCacheDrawing(false);
int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(0);
代码示例来源:origin: 18Gray/CommonUtils
/**
* 普通View截屏
* @param v
* @param fileName
* @return
*/
public static Bitmap screenShotNormalView(View v, String fileName)
{
v.clearFocus();
v.setPressed(false);
boolean willNotCache = v.willNotCacheDrawing();
v.setWillNotCacheDrawing(false);
int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(0);
if (color != 0)
{
v.destroyDrawingCache();
}
v.buildDrawingCache();
Bitmap cacheBitmap = v.getDrawingCache();
Bitmap bitmap = Bitmap.createBitmap(cacheBitmap);
// Restore the view
v.destroyDrawingCache();
v.setWillNotCacheDrawing(willNotCache);
v.setDrawingCacheBackgroundColor(color);
return bitmap;
}
代码示例来源:origin: jamorham/xDrip-plus
int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(Color.TRANSPARENT);
代码示例来源:origin: NightscoutFoundation/xDrip
int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(Color.TRANSPARENT);
代码示例来源:origin: jamorham/xDrip-plus
int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(Color.TRANSPARENT);
代码示例来源:origin: luhaoaimama1/zone-sdk
int color = view.getDrawingCacheBackgroundColor(); // 获得绘制缓存位图的背景颜色
view.setDrawingCacheBackgroundColor(0); // 设置绘图背景颜色
if (color != 0) { // 如果获得的背景不是黑色的则释放以前的绘图缓存
代码示例来源:origin: stackoverflow.com
int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(0);
内容来源于网络,如有侵权,请联系作者删除!