Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal crash when bindEventShowGlide(v, target); #42

Open
azizimusa opened this issue Mar 14, 2016 · 2 comments
Open

Fatal crash when bindEventShowGlide(v, target); #42

azizimusa opened this issue Mar 14, 2016 · 2 comments

Comments

@azizimusa
Copy link

I'm extending BaseSliderView and instead of bindEventAndShowPicasso(v, target);
I'm replacing it with bindEventShowGlide(v, target);

But when running my program. Fatal error occured. Below are the details :

FATAL EXCEPTION: main Process: com.malldirectory.ioipuchong, PID: 26813 java.lang.ClassCastException: java.io.File cannot be cast to java.lang.String at com.hkm.slider.SliderTypes.BaseSliderView$1.onResourceReady(BaseSliderView.java:335) at com.bumptech.glide.request.GenericRequest.onResourceReady(GenericRequest.java:522) at com.bumptech.glide.request.GenericRequest.onResourceReady(GenericRequest.java:507) at com.bumptech.glide.load.engine.EngineJob.handleResultOnMainThread(EngineJob.java:158) at com.bumptech.glide.load.engine.EngineJob.access$100(EngineJob.java:22) at com.bumptech.glide.load.engine.EngineJob$MainThreadCallback.handleMessage(EngineJob.java:202) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4998) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593) at dalvik.system.NativeStart.main(Native Method)

@azizimusa
Copy link
Author

It turn out. I had to use String for image path rather than converting it to File.

CustomSliderView textSliderView = new CustomSliderView(getActivity()); textSliderView .image(string image path) .setScaleType(BaseSliderView.ScaleType.Fit);

@jjhesk
Copy link
Owner

jjhesk commented May 4, 2016

check the new update for better handling of load images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants