Loading image from gallery to ImageView in Sketchware
1. In VIEW area of Sketchware project add a Button button1, and an ImageView imageview1.
3. Create a new FilePicker picker component for picking images.
4. Now create a new String List list.
5. In the event on button1 Click , use the block
FilePicker picker pick files.
6. In EVENT area add a new event FilePicker onFilesPicked under Component section.
7. In the event FilePicker onFilesPicked use the blocks:
ImageView imageview1 set image from file path ....
get at 0 of List String : filePath
as shown in image below, to set the selected image as image of imageview1.
8. Save and Run the project. Now when the user clicks button1, he can browse through gallery and select an image. The selected image will be displayed in imageview1.
Watch the videos below.
i. Pick a single image from gallery.
ii. Pick multiple images from gallery.