Giter Site home page Giter Site logo

zoomy's Issues

Zoomy Library MotionEvent.ACTION_DOWN not working?

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; } });

Cannot set 'scaleX' to Float.NaN, Fatal Exception: java.lang.IllegalArgumentException

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)

White background on status bar and nav buttons

When I zoom in on a photo (Nexus 5X, Android 6.0), I notice the background where the nav buttons and the status bar are turn white. Fitting with the rest of the background, it would be nice if they turned black instead.

Is there any way we can customize this feature?

screenshot_20180307-095551

Freezing the zoom

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).

How can i add onLongPress Listener

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.....

Could not apply zoomy inside an adapter

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();

Dialog Fragment

When using in DialogFragment, ZoomableView stays under DialogFragment. And i can't see the image.

Android 10 horrible bug D:

Hello sir, in android 10 there the images can't stay in their border

eg:
WhatsApp Image 2020-06-25 at 13 42 28

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`

Disable click during zooming

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.

hold zoom level

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?

De obscure DecorView gradually

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 ?

Zoomy in RecyclerView

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.

Image zooming in recyclerview is not smooth

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

Hi

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

Screen is moving while starting to zoom in devices with notch

Steps to reproduce:

  1. Get a device with notch.
  2. Open an app with Zoomy ImageView.
  3. Try to zoom.
    Result: Zooms successfully but screen is moving down as much as the height of the notch.
    Expected: Should zoom the ImageView smoothly without any screen movement.

onSingle touch listner?

There is no function to detect single onclick listner using this library. Plus, onclicklistner of image stop working when i use this library.

Zoomy for videos - Feature request

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.

Double tap

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.