Update

The code below works fine, but I don't want to use because is much slower

    public void start() {
        if(current != null){
            current.show();
            return;
        }
        Form f = new Form(new BoxLayout(BoxLayout.Y_AXIS));  
        f.setScrollableY(true);
        Container loading = new Container(new 
BorderLayout(BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE)).add(BorderLayout.CENTER,
 
new InfiniteProgress());
        
Util.downloadImageToFileSystem("https://dl.dropboxusercontent.com/u/47281022/IMGP0.png";,
 
            FileSystemStorage.getInstance().getAppHomePath() + 
FileSystemStorage.getInstance().getFileSystemSeparator() + "IMGP0", 
            new CallbackAdapter(){
                @Override
                public void onSucess(Object value) {
                    Image img = (Image) value;
                    img = 
img.scaledWidth(Display.getInstance().getDisplayWidth());
                    Label l = new Label(img);                        
                    f.replace(loading, l, null);
                    f.repaint();
                }
            });
        f.addComponent(loading);
        f.show();                        
        
    }



-- 
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].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/494ba573-5b12-4c61-851e-17b5897b4a9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to