= null) {
//这里要设置子控件的位置,另外子控件的位置为相对位置不是绝对位置
mImageView.layout(0, 0, 500, 500);
}
圆形转盘的知识准备
Math...开发笔记(十三)视图绘制的几个方法》,下面列出的是用到Path和Matrix的方法:
clipPath : 根据指定Path路径裁剪画布
drawPath : 在指定Path路径上绘画
drawTextOnPath...: 在指定Path路径上写文本
drawBitmap : 根据指定矩阵画图
Bitmap.createBitmap : 根据指定矩阵创建图像
代码示例
限于篇幅,这里就不贴出圆形转盘的源码了...= null) {
//这里要设置子控件的位置,另外子控件的位置为相对位置不是绝对位置
mImageView.layout(0, 0, 500, 500);
}
}
@TargetApi...0, b.getWidth(), b.getHeight(), matrix, false);
return rotaBitmap;
}
public static Bitmap getRotateBitmap2