Most efficient way to show frame by frame animation android

前端 未结 8 1860
醉话见心
醉话见心 2021-02-01 07:41

I am trying to show frame by frame animation by changing images in a imageview. I tried animation drawable in xml and also changing the bitmap of the imageview inside a Handler.

8条回答
  •  别跟我提以往
    2021-02-01 08:00

    Create an imageView using programming and then rotate it with an angle and then make another one and then rotate it.. do it for number of imageView you want to show. you only have to add only one image for it. you can rotate an image like this..

    Matrix matrix=new Matrix();
    imageView.setScaleType(ScaleType.MATRIX);   //required
    matrix.postRotate((float) angle, pivX, pivY);
    imageView.setImageMatrix(matrix);
    

提交回复
热议问题