browse.addActionListener((evt) -> {
Display.getInstance().openGallery(new ActionListener() {
public void actionPerformed(ActionEvent ev) {
if (ev != null && ev.getSource() != null) {
String chemin = (String) ev.getSource();
int index = chemin.lastIndexOf('/');
if (index > 0) {
filename = chemin.substring(index + 1);
System.out.println(filename);
try {
Image img = Image.createImage(chemin);
ImageViewer a = new ImageViewer(img);
content.add(a);
} catch (IOException ex) {
}
}
}
}
}, Display.GALLERY_IMAGE);
});
here's the code i'm having
Le mardi 11 mai 2021 à 03:27:34 UTC+1, Mohamed Melek CHTOUROU a écrit :
> Hi everyone, i'm a begginer and i'm trying to openGallery to select an
> image, then show it in a ImageViewer, then send it through php to my
> localhost
> So far i opened the gallery and selected the image ... but i have no clue
> on how to show it and send it, any kind help ?
>
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/723101e8-a6c8-43c9-8d5c-236d9ead8018n%40googlegroups.com.