imablanco / zoomy Goto Github PK
View Code? Open in Web Editor NEWZoomy is an easy to use pinch-to-zoom Android library
Zoomy is an easy to use pinch-to-zoom Android library
Hey guys, great library!
I was wondering if it would be possible for you to add this feature in the future?
Thanks
Hi, when i enable zoomy library, i can't listen for MotionEvent.ACTION_DOWN event. Can you please help?
viewHolder.imagePager.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { Toast.makeText(activity.getApplicationContext(), "ACTION_DOWN", Toast.LENGTH_SHORT).show(); } return false; } });
In addition to the gestures, I would need to know if the library has the functionality to launch zoom events programmatically. Thank you so much!
Hi,
I'm seeing this crash for some users(affects ~0.01%), all of them on android 10.
Any idea what it might be, or how to work around it?
This is all the code, not using any additional features of the library:
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:animateLayoutChanges="true"
android:scaleType="centerCrop"
android:src="@drawable/img" />
Picasso.get()
.load(imageUrl)
.error(R.drawable.img)
.placeholder(R.drawable.img)
.into(imageView)
Zoomy.Builder = Zoomy.Builder(this).target(imageView)
builder.register()
Exception:
Fatal Exception: java.lang.IllegalArgumentException
Cannot set 'scaleX' to Float.NaN
android.view.View.sanitizeFloatPropertyValue (View.java:18167)
android.view.View.sanitizeFloatPropertyValue (View.java:18141)
android.view.View.setScaleX (View.java:17494)
com.ablanco.zoomy.ZoomableTouchListener.onScale (ZoomableTouchListener.java:223)
android.view.ScaleGestureDetector.onTouchEvent (ScaleGestureDetector.java:376)
com.ablanco.zoomy.ZoomableTouchListener.onTouch (ZoomableTouchListener.java:112)
android.view.View.dispatchTouchEvent (View.java:14372)
android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3863)
android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:3551)
android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3863)
android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:3551)
android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3863)
android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:3551)
android.widget.ScrollView.dispatchTouchEvent (ScrollView.java:857)
android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3863)
android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:3551)
android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3863)
android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:3551)
android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3863)
android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:3551)
android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3863)
android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:3551)
android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3863)
android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:3551)
android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3863)
android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:3551)
com.android.internal.policy.DecorView.superDispatchTouchEvent (DecorView.java:733)
com.android.internal.policy.PhoneWindow.superDispatchTouchEvent (PhoneWindow.java:1922)
android.app.Activity.dispatchTouchEvent (Activity.java:4051)
androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent (WindowCallbackWrapper.java:69)
androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent (WindowCallbackWrapper.java:69)
com.android.internal.policy.DecorView.dispatchTouchEvent (DecorView.java:691)
android.view.View.dispatchPointerEvent (View.java:14644)
android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent (ViewRootImpl.java:6526)
android.view.ViewRootImpl$ViewPostImeInputStage.onProcess (ViewRootImpl.java:6313)
android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:5751)
android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:5804)
android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:5770)
android.view.ViewRootImpl$AsyncInputStage.forward (ViewRootImpl.java:5926)
android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:5778)
android.view.ViewRootImpl$AsyncInputStage.apply (ViewRootImpl.java:5983)
android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:5751)
android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:5804)
android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:5770)
android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:5778)
android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:5751)
android.view.ViewRootImpl.deliverInputEvent (ViewRootImpl.java:8910)
android.view.ViewRootImpl.doProcessInputEvents (ViewRootImpl.java:8771)
android.view.ViewRootImpl.enqueueInputEvent (ViewRootImpl.java:8724)
android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent (ViewRootImpl.java:9046)
android.view.InputEventReceiver.dispatchInputEvent (InputEventReceiver.java:194)
android.view.InputEventReceiver.nativeConsumeBatchedInputEvents (InputEventReceiver.java)
android.view.InputEventReceiver.consumeBatchedInputEvents (InputEventReceiver.java:183)
android.view.ViewRootImpl.doConsumeBatchedInput (ViewRootImpl.java:8986)
android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run (ViewRootImpl.java:9073)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:996)
android.view.Choreographer.doCallbacks (Choreographer.java:794)
android.view.Choreographer.doFrame (Choreographer.java:722)
android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:981)
android.os.Handler.handleCallback (Handler.java:883)
android.os.Handler.dispatchMessage (Handler.java:100)
android.os.Looper.loop (Looper.java:237)
android.app.ActivityThread.main (ActivityThread.java:7948)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1075)
See gif:
https://media.giphy.com/media/uVtOv7lrj6tpnALUh2/giphy.gif
Thanks for Library!
Hello! this is a great library I love it, great work!
But maybe in the future you can be add the possibility to freeze the zoom effect (optional).
Hello there,
There is no method to detect if user has long pressed on image, so how can I add onDoubleTap and onLongClick Listener to view ...pls help me.....
I tried implementing zoomy using the documentation and for some reason, I can't implement it inside an adapter, am I doing some error here?
Zoomy.Builder builder = new Zoomy.Builder(AdvancedItemListAdapter.this)
.target(holder.mItemImg);
builder.register();
Crash in Android O operating system while zooming due to Software rendering doesn't support hardware bitmaps
When using in DialogFragment, ZoomableView stays under DialogFragment. And i can't see the image.
Hello sir, in android 10 there the images can't stay in their border
I'm in a recyclerView in adapter class that where I'm doing the work :
`
Glide.with(holder.imageView.context).load(currentItem.imageResource).into(holder.imageView)
Zoom(holder.imageView)
holder.textView1.text = currentItem.text1
holder.textView2.text = currentItem.text2`
Hi, I noticed that the views in the background are still receiving click and touch events during zooming. Would be nice to have the option to disable background touch/click events during zooming.
If device having touch gesture(3 fingers swipe) screenshot enabled then Image Freezes on Screen
double tapping on a zoomed image will make the image to remain zoomed and will not go back to its original size
when an image is zoomed and the finger is lifted it comes to the initial state. I want to keep that at the level and come back to the initial state on double-tap. how to do that?
When you release the ImageView you de obscure the decorview by removing the shadow view. That gives a not so nice effect to the user.
Is it possible to gradually de obscure the shadow view until it fades out completely ?
Hello guys,
Can you please explain how I can unregister zoomy from a view in RecyclerView? the problem is that I have many types of view, on some of them I want to be able to apply zoom and on some I don't. Because the recycling mechanism I'm getting zooming ability on views that I don't want.
when we zoom the image status bar of app gets lost.
when using coordinator layout after zoom the collapsing toolbar does not collapse it freezes.
Hello there,
I have noticed that when using Zoomy in reyclerview, pinch to zoom functionality is not working very smoothly as it should work. Most of times user need to try two time to zoom image... I guess this occurs due to some bug in gesture recognition. I tried one library(ImageZoom) which provides similar functionality like zoomy and its pinch to zoom functionality is very accurate even in recyclerview also but it have some other issues.
So it will be great if you try to improve image zooming logic.... thanks
it is zooming only center of picture. it is not zooming the area of fingers coordinate on picture. is this possible to zooming finger coordinate area? Thank you
Steps to reproduce:
jcenter
is at end of life, please migrate it to Maven Central.
There is no function to detect single onclick listner using this library. Plus, onclicklistner of image stop working when i use this library.
You've got an amazing library, If you can release an update with video zoom it'd great!
Please update if it is planned in the update pipeline.
#Problem
In the AndroidManifest.xml
android:allowBackup="true"
should not be set, it should be the application that decides and not the library
AzureAD/azure-activedirectory-library-for-android#472
realm/realm-java#2227
Is it possible to add a callback to manage the double tap gesture?
I could add it, but i don't know git enough to make that
Ex. use case: scroll RecyclerView using two finger, if swipes up or down action performed.
Current version translates imag
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.