Reputation: 41
I have an issue with ImageDownloadService. Below is my code. If I use a label, I can display the image downloaded from a server. But if I use a button, nothing is displayed. I have set the placeholder as the initial icon of the button. Please what am i doing wrong?
EncodedImage eImg = EncodedImage.findButton(f).getIcon();
Image i = URLImage.createToStorage(eImg, "MyStoredImage.jpg", "http://ImgURL.png", URLImage.RESIZE_SCALE);
//now set the ad image to downloaded image
findButton(f).setIcon(i);
If I used findLabel(f).getIcon()
instead and findLabel(f).setIcon(i)
, the code would work but for Button it does not. Why is this?
Thanks in advance.
Upvotes: 0
Views: 299
Reputation: 52760
See the discussion in the Codename One forum here https://groups.google.com/d/msg/codenameone-discussions/05dLV771OV8/x-pEYngCrsEJ
Upvotes: 1