B4A Class ParsGlide(Glide)

Discussion in 'Additional libraries, classes and official updates' started by mshafiee110, Aug 7, 2017.

  1. mshafiee110

    mshafiee110 Member Licensed User

    Hi ,it is a simple and clean class for use in B4A of this project.
    in this sample images load from URL,Asset,Resource,MediaBrowser...
    this lib support gif images....

    Download glide-full-4.0.0.jar and copy in lib folder

    Download glide-full-4.0.0.jar


    Note: Update your SDK before using...and run in release mode..


    Glide is a fast and efficient open source media management and image loading framework for Android that wraps media decoding, memory and disk caching, and resource pooling into a simple and easy to use interface.


    Comparison between PICASSO VS GLIDE

     

    Attached Files:

    Last edited: Aug 7, 2017
  2. Emme Developer

    Emme Developer Well-Known Member Licensed User

    +100000000! Thanks for this!
     
    mshafiee110 likes this.
  3. mshafiee110

    mshafiee110 Member Licensed User

    your welcome
     
  4. Douglas Farias

    Douglas Farias Expert Licensed User

    Hi @mshafiee110
    i downloaded your lib and tested, your example works fine.

    but when i will try add this to another project (not your demo) give me error.


    i have added the class to my project, i have copied the res folder and added this to my project too.
    i have the glide-full-4.0.0.jar on my lib folder, b4a lib folder too.

    you know how solve this error?

    the error is on this line.
    Code:
    Return jo.InitializeStatic("com.bumptech.glide.Glide").RunMethod("with"Array(context))
    thank you
     
    mshafiee110 likes this.
  5. mshafiee110

    mshafiee110 Member Licensed User

    can you put your code here?
     
  6. cxdzbl

    cxdzbl Member Licensed User

    Initialize error in debug mode
     
    mshafiee110 likes this.
  7. MAGAREY

    MAGAREY Member Licensed User

    i dont know if i made it wrong but, only works if you creates the image view by code?
    when i create with the designed , it throws me an error:

    Code:
    parsglide_initialize (java line: 109)
    java.lang.IllegalArgumentException: You must 
    not call setTag() on a view Glide is targeting
        at com.bumptech.glide.request.target.ViewTarget.getRequest(ViewTarget.java:
    111)
        at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:
    356)
        at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:
    413)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4j.object.JavaObject.RunMethod(
    JavaObject.java:131)
        at anywheresoftware.b4j.object.JavaObject.RunMethodJO(
    JavaObject.java:138)
        at com.FliFlix.tv.parsglide._initialize(parsglide.java:
    109)
        at com.FliFlix.tv.tablettv._imgitemdown(tablettv.java:
    1629)
        at com.FliFlix.tv.tablettv._createlistitem(tablettv.java:
    1508)
        at com.FliFlix.tv.tablettv._llenarsecciones(tablettv.java:
    2541)
        at com.FliFlix.tv.tablettv._cearsecciones(tablettv.java:
    1316)
        at com.FliFlix.tv.tablettv$ResumableSub_Activity_Create.resume(tablettv.java:
    715)
        at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:
    240)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    180)
        at anywheresoftware.b4a.keywords.Common$
    11.run(Common.java:1135)
        at android.os.Handler.handleCallback(Handler.java:
    751)
        at android.os.Handler.dispatchMessage(Handler.java:
    95)
        at android.os.Looper.loop(Looper.java:
    154)
        at android.app.ActivityThread.main(ActivityThread.java:
    6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    776)
    starter_application_error (java line: 
    165)
    android.content.ActivityNotFoundException: No 
    Activity found to handle Intent { act=android.intent.action.SEND_MULTIPLE typ=text/plain flg=0x10000000 (has extras) }
        at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1809)
        at android.app.Instrumentation.execStartActivity(Instrumentation.java:1523)
        at android.app.ContextImpl.startActivity(ContextImpl.java:791)
        at android.app.ContextImpl.startActivity(ContextImpl.java:768)
        at android.content.ContextWrapper.startActivity(ContextWrapper.java:356)
        at anywheresoftware.b4a.keywords.Common.StartActivity(Common.java:850)
        at com.FliFlix.tv.starter._application_error(starter.java:165)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
        at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1038)
        at anywheresoftware.b4a.keywords.Common.CallSubNew3(Common.java:1001)
        at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.handleUncaughtException(ServiceHelper.java:135)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:212)
        at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1135)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
    starter_application_error (java line: 165)
    android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SEND_MULTIPLE typ=text/plain flg=0x10000000 (has extras) }
        at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1809)
        at android.app.Instrumentation.execStartActivity(Instrumentation.java:1523)
        at android.app.ContextImpl.startActivity(ContextImpl.java:791)
        at android.app.ContextImpl.startActivity(ContextImpl.java:768)
        at android.content.ContextWrapper.startActivity(ContextWrapper.java:356)
        at anywheresoftware.b4a.keywords.Common.StartActivity(Common.java:850)
        at com.FliFlix.tv.starter._application_error(starter.java:165)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
        at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1038)
        at anywheresoftware.b4a.keywords.Common.CallSubNew3(Common.java:1001)
        at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.handleUncaughtException(ServiceHelper.java:135)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:212)
        at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1135)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
    ** Activity (main) Create, isFirst = true **
    parsglide_initialize (java line: 100)
    java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:131)
        at anywheresoftware.b4j.object.JavaObject.RunMethodJO(JavaObject.java:138)
        at de.amberhome.appcompat.serachviewexample.parsglide._initialize(parsglide.java:100)
        at de.amberhome.appcompat.serachviewexample.main$ResumableSub_Activity_Create.resume(main.java:375)
        at de.amberhome.appcompat.serachviewexample.main._activity_create(main.java:338)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
        at de.amberhome.appcompat.serachviewexample.main.afterFirstLayout(main.java:102)
        at de.amberhome.appcompat.serachviewexample.main.access$000(main.java:17)
        at de.amberhome.appcompat.serachviewexample.main$WaitForLayout.run(main.java:80)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
    Caused by: java.lang.IllegalArgumentException: You must not call setTag() on a view Glide is targeting
        at com.bumptech.glide.request.target.ViewTarget.getRequest(ViewTarget.java:111)
        at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:356)
        at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:413)
        ... 18 more
    java.lang.reflect.InvocationTargetException
    ** Activity (main) Resume **
    ** Activity (main) Create, isFirst = true **
    parsglide_initialize (java line: 100)
    java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:131)
        at anywheresoftware.b4j.object.JavaObject.RunMethodJO(JavaObject.java:138)
        at de.amberhome.appcompat.serachviewexample.parsglide._initialize(parsglide.java:100)
        at de.amberhome.appcompat.serachviewexample.main$ResumableSub_Activity_Create.resume(main.java:376)
        at de.amberhome.appcompat.serachviewexample.main._activity_create(main.java:339)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
        at de.amberhome.appcompat.serachviewexample.main.afterFirstLayout(main.java:102)
        at de.amberhome.appcompat.serachviewexample.main.access$000(main.java:17)
        at de.amberhome.appcompat.serachviewexample.main$WaitForLayout.run(main.java:80)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
    Caused by: java.lang.IllegalArgumentException: You must not call setTag() on a view Glide is targeting
        at com.bumptech.glide.request.target.ViewTarget.getRequest(ViewTarget.java:111)
        at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:356)
        at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:413)
        ... 18 more
    java.lang.reflect.InvocationTargetException
    ** Activity (main) Create, isFirst = true **
    parsglide_initialize (java line: 100)
    java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:131)
        at anywheresoftware.b4j.object.JavaObject.RunMethodJO(JavaObject.java:138)
        at de.amberhome.appcompat.serachviewexample.parsglide._initialize(parsglide.java:100)
        at de.amberhome.appcompat.serachviewexample.main$ResumableSub_Activity_Create.resume(main.java:376)
        at de.amberhome.appcompat.serachviewexample.main._activity_create(main.java:339)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
        at de.amberhome.appcompat.serachviewexample.main.afterFirstLayout(main.java:102)
        at de.amberhome.appcompat.serachviewexample.main.access$000(main.java:17)
        at de.amberhome.appcompat.serachviewexample.main$WaitForLayout.run(main.java:80)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
    Caused by: java.lang.IllegalArgumentException: You must not call setTag() on a view Glide is targeting
        at com.bumptech.glide.request.target.ViewTarget.getRequest(ViewTarget.java:111)
        at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:356)
        at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:413)
        ... 18 more
    java.lang.reflect.InvocationTargetException
     
    mshafiee110 likes this.
  8. mshafiee110

    mshafiee110 Member Licensed User

    In this case you must claer tag from view ...
     
    MAGAREY likes this.
  9. MAGAREY

    MAGAREY Member Licensed User

    thanks it works
     
    mshafiee110 likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice