Picasso: Extension to load images efficiently with Picasso

Aren't you able to change it with BackgroundColor property?

ok for arrangement, but Image do not have BackgroundColor property.

Sorry, I am unable to understand your query :sweat_smile:

What I mean is:
After I set an Image with this extension, how can I remove the picture on the Image component?

any way I have made an remix version from your open resource code, like this

image.getView().setBackground(null);

1 Like

or use an 1x1px empty transparent image (empty.png).

2 Likes

and I dont understand the meaning of enableIndicators. What's this for?

For height/width, I tried to set it to a different value from image's orign height/width, but it did not have any change.

Picasso says it is for debugging purposes to see from where the image is coming i.e. cache, storage or online.

src

2 Likes

ChangeLog Version 2

  • Migrated to Rush
    Aix size reduced by 50%

com.sunny.Picasso.aix (339.7 KB)

3 Likes

Picasso error

test version in niotron and appinventor

the error information is

ERROR: appinventor/ai_anon6403037951164/test/Screen1.yail line 27: caught exception in inliner for # - java.lang.RuntimeException: no such class: com.sunny.Picasso.Picasso

Re-import extension and then build apk.

thank you for your fast replay
i imported many times and can not find the reason while other extensions can work

1 Like

Try in a different project.

Failed to build the APK on different of my projects.
I imported the extension also in an empty project and tried to build the APK:

Previous versions 1.1 - 1.4 work, but version 2 doesn't.

Btw, what is the (correct / complete) path here:

grafik

The problems continue:
In addition, the "Error 908: The permission READ_EXTERNAL_STORAGE..." is displayed on Android 13. Firstly, no storage permissions should be requested on Android 11+ for self-created images and secondly, it should (if at all) at least be the correct READ permission, namely READ_MEDIA_IMAGES (on Android 13+).

So please remove all storage permissions (at least on Android 11+). If these are needed because images not created by the app are to be accessed, the app developer should request the permission themselves. I have been suggesting this approach to MIT (especially for the Image comp) for years; you and @Taifun already implemented it in your File extensions years ago.

1 Like

Correction. The permission issue was caused by the File component (File.MoveFile method).

I had actually decided not to touch the File component again until these bugs were fixed. But I forgot again :upside_down_face:, and am now sticking with one of the two file extensions from you and Taifun!

ChangeLog Version 2.1

  • Fixed no such class: com.sunny.Picasso.Picasso error occurring while compiling apk

com.sunny.Picasso.aix (344.9 KB)

2 Likes

I get an error saying "Error image may not be null" even though I've set the error image

Show your relevant blocks.
See also here: How to ask a question (open new topic)

1 Like