florent37 / MaterialViewPager

A Material Design ViewPager easy to use library
https://www.fiches-plateau-moto.fr
Apache License 2.0
8.15k stars 1.48k forks source link

ava.lang.IllegalArgumentException: Cannot set 'scaleX' to Float.NaN #346

Open devdhar04 opened 5 years ago

devdhar04 commented 5 years ago

I am facing this issue : Fatal Exception: java.lang.IllegalArgumentException: Cannot set 'scaleX' to Float.NaN at android.view.View.sanitizeFloatPropertyValue(View.java:15425) at android.view.View.sanitizeFloatPropertyValue(View.java:15399) at android.view.View.setScaleX(View.java:14788) at android.support.v4.view.ViewCompat.setScaleX(ViewCompat.java:2870) at com.github.florent37.materialviewpager.Utils.setScale(Utils.java:66) at com.github.florent37.materialviewpager.MaterialViewPagerAnimator.onMaterialScrolled(MaterialViewPagerAnimator.java:198) at com.github.florent37.materialviewpager.MaterialViewPagerAnimator.access$000(MaterialViewPagerAnimator.java:40) at com.github.florent37.materialviewpager.MaterialViewPagerAnimator$3.onScrolled(MaterialViewPagerAnimator.java:340) at android.support.v7.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:4892) at android.support.v7.widget.RecyclerView.scrollByInternal(RecyclerView.java:1889) at android.support.v7.widget.RecyclerView.onTouchEvent(RecyclerView.java:3122) at android.view.View.dispatchTouchEvent(View.java:12513) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3024) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2705) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3030) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:440) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1830) at android.app.Activity.dispatchTouchEvent(Activity.java:3400) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:398) at android.view.View.dispatchPointerEvent(View.java:12752) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5107) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4910) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4427) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4480) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4446) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4586) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4454) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4643) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4427) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4480) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4446) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4454) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4427) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7093) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7062) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7023) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7196) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:186) at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(InputEventReceiver.java) at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:177) at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:7167) at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:7219) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949) at android.view.Choreographer.doCallbacks(Choreographer.java:761) at android.view.Choreographer.doFrame(Choreographer.java:690) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

tobi512 commented 5 years ago

Hi @devdhar04 did you already find a solution? I'm having the same issue on another library (using React Native), but the error message is exactly the same. Let me know if you have any more information!

Cheers, Tobias

devdhar04 commented 5 years ago

Hi @devdhar04 did you already find a solution? I'm having the same issue on another library (using React Native), but the error message is exactly the same. Let me know if you have any more information!

Cheers, Tobias

I didnt get any solution of that issue, so i removed this library from my code , as it crashing on Android 9.0.

Goodgulf91 commented 5 years ago

Any one have solution for this issue?

jsyjst commented 5 years ago

Modify targetSdkVersion=27, the pro test had effect

masheransari commented 4 years ago

Modify targetSdkVersion=27, the pro test had effect

This solution is not working on AndroidX

futbolkolektyw commented 4 years ago

I made fork with fix for this issue: implementation "com.github.futbolkolektyw:MaterialViewPager:1.4.0"

feel free to use it

vedraj360 commented 4 years ago

I made fork with fix for this issue: implementation "com.github.futbolkolektyw:MaterialViewPager:1.4.0"

feel free to use it

Thanks for this It worked. Can you tell me how you fixed the problem as your solution worked.

Goodgulf91 commented 4 years ago

I just checked the variable 'scale' is not null https://github.com/futbolkolektyw/MaterialViewPager/commit/0a9c4dc72d4e211a6be26204b46648aba820cdaa

SalimovAzimjon commented 3 years ago

I just checked the variable 'scale' is not null futbolkolektyw@0a9c4dc

Thanks a lot!!!

MikhT commented 3 years ago

I made fork with fix for this issue: implementation "com.github.futbolkolektyw:MaterialViewPager:1.4.0" feel free to use it

Thanks for this It worked. Can you tell me how you fixed the problem as your solution worked.

I try it but I didn't found "com.github.florent37.materialviewpager.adapter.RecyclerViewMaterialAdapter;" you know why? adapter not exist in your fork?

Goodgulf91 commented 3 years ago

@Mikht

I made fork with fix for this issue: implementation "com.github.futbolkolektyw:MaterialViewPager:1.4.0" feel free to use it

Thanks for this It worked. Can you tell me how you fixed the problem as your solution worked.

I try it but I didn't found "com.github.florent37.materialviewpager.adapter.RecyclerViewMaterialAdapter;" you know why? adapter not exist in your fork?

It was removed by orginal creator: https://github.com/florent37/MaterialViewPager/commit/4ebc9f47834f21ad013a5e5908210c6906622c00

on 28 Feb 2017