本文整理了Java中android.widget.ImageButton.onDraw()
方法的一些代码示例,展示了ImageButton.onDraw()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageButton.onDraw()
方法的具体详情如下:
包路径:android.widget.ImageButton
类名称:ImageButton
方法名:onDraw
暂无
代码示例来源:origin: Clans/FloatingActionButton
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
代码示例来源:origin: DaxiaK/MyDiary
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
}
代码示例来源:origin: vanilla-music/vanilla
@Override
public void onDraw(Canvas canvas) {
if (mCirclePaint != null) {
// Draw a circle on the background, but only
// if the color is set.
final int x = getWidth() / 2;
final int y = getHeight() / 2;
final float r = (x > y ? y : x);
canvas.drawCircle(x, y, r*0.80f, mCirclePaint);
}
super.onDraw(canvas);
}
代码示例来源:origin: gqjjqg/android-extend
@Override
protected void onDraw(Canvas canvas) {
// TODO Auto-generated method stub
canvas.save();
canvas.scale(scaleX, scaleY, this.getWidth() / 2f, this.getHeight() / 2f);
canvas.rotate(-mCurDegree, this.getWidth() / 2f, this.getHeight() / 2f);
super.onDraw(canvas);
canvas.restore();
}
代码示例来源:origin: Blankeer/MDWechat
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
代码示例来源:origin: douzifly/clear-todolist
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
代码示例来源:origin: LongDinhF/Hamburger-Button
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
canvas.drawRoundRect(mRFBorder, getBorderCornersRadius(), getBorderCornersRadius(), mPaintBorder);
canvas.drawRoundRect(mRFBackground, getBorderCornersRadius(), getBorderCornersRadius(), mPaintBackground);
canvas.save();
canvas.clipPath(mClipPath);
canvas.drawRect(mRFSlider, mPaintSlider);
canvas.drawRoundRect(mLineTop, getLineCornersRadius(), getLineCornersRadius(), mPaintLine);
canvas.drawRoundRect(mLineCenter, getLineCornersRadius(), getLineCornersRadius(), mPaintLine);
canvas.drawRoundRect(mLineBottom, getLineCornersRadius(), getLineCornersRadius(), mPaintLine);
canvas.restore();
}
内容来源于网络,如有侵权,请联系作者删除!