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

How to Have an attribute to take an Image and how to actually make a client upload an image #14

Open
ghazi-ge1803610 opened this issue Oct 24, 2021 · 1 comment

Comments

@ghazi-ge1803610
Copy link

Hello

We have a problem with the whole image story, if you can give us hits on how to approach it that would be great

@erradi
Copy link
Collaborator

erradi commented Oct 25, 2021

Due to limited remaining time, for phase 1, you can simply enter/assign the cheque image a drawable name then display the cheque image using Image Composable:
val context = LocalContext.current
val chequeImage= context.resources.getIdentifier(cheque.image, "drawable", context.packageName)
Image(painter = painterResource(id = chequeImage), contentDescription = "Cheque")

=> Similar to what you have done in the Stadiums Lab. Go back to Stadiums Lab for further details.
Phase 2 will give further guidance to do it in a more realistic way.

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

No branches or pull requests

2 participants