I'm trying to restrict the zoom of a Bitmap in a ImageViewTouch widget . How can i achieve it ?

final ImageViewTouch imgPlot = (ImageViewTouch) findViewById(R.id.disp_plot_img);
tempBitmap = Utilities.decodeSampledBitmapFromFile(ecgData.getLocalFilePath() + ".png", Utilities.reqSnapWidth,Utilities.reqSnapHeight);
imgPlot.setImageBitmap(tempBitmap);

Here is the xml

<it.sephiroth.android.library.imagezoom.ImageViewTouch
        android:id="@+id/disp_plot_img"
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:layout_weight="1.5"
        android:scaleType="fitXY"/>

I want to restrict the zoom to 3X or 5X.

有帮助吗?

解决方案

im pretty sure there is setMaxZoom orso method in ImageViewTouch class

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top