I'm using https://github.com/CyberAgent/android-gpuimage
In .xml layout file, I use GPUImageView
to display photo.
Now I want the photo can drag & zoom in/ out.
Which way I should do:
- Use a filter like that idea:
"You can apply a GPUImageTransformFilter to the GPUImagePicture (add the transform filter as a target of the picture, then add the blending filter as a target of the transform filter). You can then apply arbitrary transformations to the image, like scaling, rotation, and translation."
https://github.com/BradLarson/GPUImage/issues/51
- Custom
GPUImageView
like theseImageViewZoom
libraries:
https://github.com/search?l=Java&q=image+zoom&type=Repositories&utf8=%E2%9C%93
If you have other way, or more detail, please show me.
------------- Update --------------
Because I have some custom views will be added later, so I follow the idea: create ZoomableViewGroup (from https://stackoverflow.com/a/19204645/3455160 ) like this:
<ZoomableViewGroup
android:id="@+id/zoom_group"
android:layout_above="@+id/panel_adjuster"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<jp.co.cyberagent.android.gpuimage.GPUImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ZoomableViewGroup>
ZoomableViewGroup scales well bet GPUImageView doesn't.