0
我想捏縮放圖像,但問題是當我縮放它不放大和縮小我的手指。它關係到0點,0圖像縮放不正確
這裏是我的代碼:
@Override
public boolean onScale(ScaleGestureDetector detector) {
mScaleFactor = detector.getScaleFactor();
Log.e("ScaleFactor", "" + mScaleFactor);
// Don't let the object get too small or too large.
mScaleFactor = Math.max(0.4f, Math.min(mScaleFactor, 5.0f));
if(mScaleFactor>=1)
mScaleFactor=1f;
invalidate();
return true;
}
我嘗試了很多,但能得到什麼辦法來解決這個問題。
請經過鏈接:http://stackoverflow.com/questions/5977138/android-multi-touch-zooming – Basil 2012-01-09 06:55:18
我MOT加載從資源的形象,我是在我的畫布上畫一個關係。我必須放大。 – sajjoo 2012-01-09 07:19:15
http://stackoverflow.com/a/9652985/1181992嘗試此鏈接... – 2012-04-05 05:44:45