小编Ram*_*ana的帖子

在Android中使用多点触控旋转和缩放

我想在多点触摸事件上旋转和缩放图像,我能够拖动,缩放图像,但我无法理解图像的旋转.我面临问题所以请尽快帮助我.我的代码在那里

    public class Touch extends Activity implements OnTouchListener {
       private static final String TAG = "Touch";
      // These matrices will be used to move and zoom image
       Matrix matrix = new Matrix();
   Matrix matrix1 = new Matrix();
   Matrix savedMatrix = new Matrix();
   Matrix savedMatrix2 = new Matrix();
   // We can be in one of these 3 states
   static final int NONE = 0;
   static final int DRAG = 1;
   static final int ZOOM = 2;
   int mode = NONE;
   float …
Run Code Online (Sandbox Code Playgroud)

android android-imageview android-gesture

9
推荐指数
1
解决办法
1万
查看次数