Androidã®ç»åãå転ãããæ¹æ³ã«ã¯ãRotateAnimationã¯ã©ã¹ã使ç¨ããæ¹æ³ããcanvasã¯ã©ã¹ã使ç¨ããæ¹æ³ãªã©ãããããä»åã®ã¿ããã¤ãã³ãã使ã£ã¦ç»åãå転ãããã®ã¯ãcanvasã¯ã©ã¹ã®rotateã¡ã½ããã使ç¨ãã¦å転ãããã ã¿ããã¤ãã³ãã®MotionEvent.ACTION_MOVEã§ãå転ãããæã®è§åº¦ãè¨ç®ããã ãããªæã double rotate touchX=event.getX(); touchY=event.getY(); rotate+=Math.atan2(touchY-getHeight/2,touchX-getWidth()/2); ããã¦ããã®rotateãcanvasã¯ã©ã¹ã§å¼ã³åºããrotateã¡ã½ããã®å¼æ°ã«ã¦ä½¿ç¨ããã canvas.rotate((int)rotate,getWidth()/2,getHeight()/2
{{#tags}}- {{label}}
{{/tags}}