方案一:

    (1)获取ImageView对应的图片,并将其转成Bitmap;

    (2)创建Matrix对象;

    (3)调用matrix.setRotate(     );设置旋转度数

    (4)重新创建bitmap

    (5)ImageView设置ImageBitmap

        

      Bitmap bitmap = ((BitmapDrawable)getResources().getDrawable(R.mipmap.ic_launcher)).getBitmap();
      Matrix matrix = new Matrix();
      matrix.setRotate(progress);
      bitmap = Bitmap.createBitmap(bitmap,0,0,bitmap.getWidth(),bitmap.getHeight(),matrix,true);
      imageView.setImageBitmap(bitmap);

相关文章:

  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2021-11-01
  • 2021-06-17
  • 2021-06-14
  • 2022-02-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-12
  • 2021-11-07
  • 2022-12-23
相关资源
相似解决方案