2015-01-14 2 views
1

의 doubletap 오버라이드 (override)하는 방법 : 나는 mAttacher.setOnDoubleTapListener(this); 이 인터페이스의 방법을 설정하고있어나는에서 onCreate()에서 doubletap</p> <p>후 규모 = 4를 설정하려는에서 PhotoView

  imageView = (ImageView)rootView.findViewById(R.id.imageView1); 
     mAttacher = new PhotoViewAttacher(imageView); 
     imageLoader.displayImage(globalWallImages.get(position).preview, imageView, options); 
     mAttacher.setOnDoubleTapListener(this); 

을 그 일 :

public boolean onDoubleTap(MotionEvent e) { 
     Log.e("","onDoubleTap"); 
     mAttacher.setScale(4); 
     return true; 
    } 

하지만 이미지가

+0

당신은 이미지 뷰에 XML을 통해 scaleType을 설정 했습니까? 이 믿을 setScale 메서드의 동작을 변경할 수 있습니다. –

답변

0

발견 확장하고 싶지 않아 defauld의 MaximumScale에 의해 솔루션

는 < 4, 그래서 추가

mAttacher.setMaximumScale(5f);