public AnimatedZoomRunnable(PhotoViewAttacher photoViewAttacher, float currentZoom, float targetZoom, float focalX, float focalY) { this.photoViewAttacher = photoViewAttacher; mFocalX = focalX; mFocalY = focalY; mStartTime = Java.Lang.JavaSystem.CurrentTimeMillis(); mZoomStart = currentZoom; mZoomEnd = targetZoom; }
public PhotoView(Context context, IAttributeSet attr, int defStyle) : base(context, attr, defStyle) { base.SetScaleType(ScaleType.Matrix); mAttacher = new PhotoViewAttacher(this); if (null != mPendingScaleType) { SetScaleType(mPendingScaleType); mPendingScaleType = null; } }
public PhotoView(Context context) : base(context, null, 0) { base.SetScaleType(ScaleType.Matrix); mAttacher = new PhotoViewAttacher(this); if (null != mPendingScaleType) { SetScaleType(mPendingScaleType); mPendingScaleType = null; } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); PhotoView mImageView = FindViewById <PhotoView>(Resource.Id.iv_photo); mCurrMatrixTv = FindViewById <TextView>(Resource.Id.tv_current_matrix); Drawable bitmap = Resources.GetDrawable(Resource.Drawable.wallpaper); mImageView.SetImageDrawable(bitmap); // The MAGIC happens here! mAttacher = new PhotoViewAttacher(mImageView); // Lets attach some listeners, not required though! mAttacher.SetOnMatrixChangeListener(new MatrixChangeListener(this)); mAttacher.SetOnPhotoTapListener(new PhotoTapListener(this)); }
public void SetPhotoViewAttacher(PhotoViewAttacher newPhotoViewAttacher) { this.photoViewAttacher = newPhotoViewAttacher; }
public DefaultOnDoubleTapListener(PhotoViewAttacher photoViewAttacher) { SetPhotoViewAttacher(photoViewAttacher); }
public FlingRunnable(PhotoViewAttacher photoViewAttacher, Context context) { mScroller = ScrollerProxy.GetScroller(context); this.photoViewAttacher = photoViewAttacher; }
public MSimpleOnGestureListener(PhotoViewAttacher photoViewAttacher) { this.photoViewAttacher = photoViewAttacher; }