其实很简单。= =

只要重载

protected void onDraw(Canvas canvas) {  }

这个方法就可以了

不过有一点要注意的

protected void onDraw(Canvas canvas) {
   super.onDraw(canvas);
  Paint paint = new Paint();
  paint.setColor(Color.RED);
  canvas.drawRect(left, top, right, bottom, paint);   }

要画的内容需要在super之后 否定的话会画在原图片的下面

哈哈 那是看不到的

 ~~~~~~~~~~~~~~~~~~~~完了 就这样
            
 


 

相关文章:

  • 2022-12-23
  • 2021-07-27
  • 2022-02-09
  • 2021-08-13
  • 2022-12-23
  • 2021-07-10
  • 2021-08-30
  • 2021-06-29
猜你喜欢
  • 2022-12-23
  • 2021-04-07
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案