本文整理了Java中com.tencent.smtt.sdk.WebView.drawChild()
方法的一些代码示例,展示了WebView.drawChild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.drawChild()
方法的具体详情如下:
包路径:com.tencent.smtt.sdk.WebView
类名称:WebView
方法名:drawChild
暂无
代码示例来源:origin: leftcoding/GankLy
@Override
protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
// boolean ret = super.drawChild(canvas, child, drawingTime);
// canvas.save();
// Paint paint = new Paint();
// paint.setColor(0x7fff0000);
// paint.setTextSize(24.f);
// paint.setAntiAlias(true);
// if (getX5WebViewExtension() != null) {
// canvas.drawText(this.getContext().getPackageName() + "-pid:"
// + android.os.Process.myPid(), 10, 50, paint);
// canvas.drawText(
// "X5 Core:" + QbSdk.getTbsVersion(this.getContext()), 10,
// 100, paint);
// } else {
// canvas.drawText(this.getContext().getPackageName() + "-pid:"
// + android.os.Process.myPid(), 10, 50, paint);
// canvas.drawText("Sys Core", 10, 100, paint);
// }
// canvas.drawText(Build.MANUFACTURER, 10, 150, paint);
// canvas.drawText(Build.MODEL, 10, 200, paint);
// canvas.restore();
// return ret;
return super.drawChild(canvas, child, drawingTime);
}
代码示例来源:origin: xkzh/yduoduo
/**
* 这里可以为自定义webview绘制背景或文字
* @param canvas
* @param child
* @param drawingTime
* @return
*/
@Override
protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
boolean ret = super.drawChild(canvas, child, drawingTime);
canvas.save();
Paint paint = new Paint();
paint.setColor(0x7fff0000);
paint.setTextSize(24.f);
paint.setAntiAlias(true);
canvas.drawText("", 10, 50, paint);
// if (getX5WebViewExtension() != null) {
// canvas.drawText(
// "X5 Core:" + QbSdk.getTbsVersion(this.getContext()), 10,
// 100, paint);
// }
canvas.restore();
return ret;
}
代码示例来源:origin: luili16/UIMocker
@Override
protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
boolean ret = super.drawChild(canvas, child, drawingTime);
canvas.save();
Paint paint = new Paint();
paint.setColor(0x7fff0000);
paint.setTextSize(24.f);
paint.setAntiAlias(true);
if (getX5WebViewExtension() != null) {
canvas.drawText(this.getContext().getPackageName() + "-pid:"
+ android.os.Process.myPid(), 10, 50, paint);
canvas.drawText(
"X5 Core:" + QbSdk.getTbsVersion(this.getContext()), 10,
100, paint);
} else {
canvas.drawText(this.getContext().getPackageName() + "-pid:"
+ android.os.Process.myPid(), 10, 50, paint);
canvas.drawText("Sys Core", 10, 100, paint);
}
canvas.drawText(Build.MANUFACTURER, 10, 150, paint);
canvas.drawText(Build.MODEL, 10, 200, paint);
canvas.restore();
return ret;
}
代码示例来源:origin: linxin6560/DetailScrollView
@Override
protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
boolean ret = super.drawChild(canvas, child, drawingTime);
canvas.save();
Paint paint = new Paint();
paint.setColor(0x7fff0000);
paint.setTextSize(24.f);
paint.setAntiAlias(true);
if (getX5WebViewExtension() != null) {
canvas.drawText(this.getContext().getPackageName() + "-pid:"
+ android.os.Process.myPid(), 10, 50, paint);
canvas.drawText(
"X5 Core:" + QbSdk.getTbsVersion(this.getContext()), 10,
100, paint);
} else {
canvas.drawText(this.getContext().getPackageName() + "-pid:"
+ android.os.Process.myPid(), 10, 50, paint);
canvas.drawText("Sys Core", 10, 100, paint);
}
canvas.drawText(Build.MANUFACTURER, 10, 150, paint);
canvas.drawText(Build.MODEL, 10, 200, paint);
canvas.restore();
return ret;
}
内容来源于网络,如有侵权,请联系作者删除!