How can i create block where developer can input a image from assets?

and I think your code will return wrong

1 Like

See, that retun error:
http://editor.appybuilder.com:6081/logs/com.appybuilder.salmanappinventor.Testaix.java.txt

1 Like

can you please try again. with this code

@SimpleFunction
public void SetupView(AndroidViewComponent layout, String image) throws Exception {
View view = layout.getView();
Bitmap bitmap = MediaUtil.getBitmapDrawable(form, image).getBitmap();
view.setImageBitmap(bitmap);
}

hope this work for you

sur @Mohamed_Tamer kindly have a look here

I think it won’t work because the view can’t be set using setImageBitmap because in my opinion setImageBitmap only works with ImageView.

and what I said was true

:thinking:
It would be good if one of you makes a step by step guide on how to implement these codes for beginners. In this way many (like me) could learn how to do it !!!

3 Likes

i don’t know why casting is not working for you as i have created my extension using casting method which is working fine.

i think you need to use appinventor sources. Setup the sources . Now !

hello, it’s taking a long time, and I’m still not ready for it

1 Like

what you will do when you need to use Library in your extension.

it’s better to change your compiler than getting errors.

sorry I think the appybuilder compiler is still good, and I’m sure the code is wrong

1 Like

as your wish :no_mouth:

@Mohamed_Tamer, are you sure your code is working?

1 Like

so, does anyone have a code that can help?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.