I have worked all this afternoon on test applications, trying to
understand my problem.
I would like to explain my results, hoping to receive your help and
also to be useful to somebody.
So, using GWT 1.5.1 and an Android (beta version) emulator, I have
noticed that

1) I have problems transferring listboxes with dynamic content to
Android
    For instance, in case I fill my listbox by invoking a remote-
procedure-call (RPC) to a service,
    I cannot open the listbox properly. Here is the client-side code

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextArea;
import com.google.gwt.user.client.ui.VerticalPanel;


public class NewAndroid implements EntryPoint {

        public VerticalPanel backPanel = new VerticalPanel();
        public VerticalPanel mainPanel = new VerticalPanel();
        public ListBox actList = new ListBox();
        public TextArea textSendBox = new TextArea();
        public TextArea textReceiveBox = new TextArea();
        public Button button = new Button ("Send");
        public Image img = new Image("");

        public void onModuleLoad(){

        RootPanel.get().add(mainPanel);

        mainPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
        mainPanel.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);

        mainPanel.setSpacing(15);
        actList.setWidth("100%");
        mainPanel.add(img);

        listService();

        mainPanel.add(actList);
        textReceiveBox.setVisibleLines(5);
        textReceiveBox.setWidth("100%");
        mainPanel.add(textReceiveBox);
        textSendBox.setVisibleLines(2);
        textSendBox.setWidth("100%");
        mainPanel.add(textSendBox);
        mainPanel.add(button);
        }


        public void listService (){
           ListServiceAsync service = (ListServiceAsync)
GWT.create(ListService.class);
           service.listService(new ListCallback());
        }

        public class ListCallback implements AsyncCallback {
        public void onFailure(Throwable caught) {
                                GWT.log("Error ", caught);
                                caught.printStackTrace();
                                System.out.println("Unsuccessfull service");
                        }
                        public void onSuccess(Object result) {
                                System.out.println("Successfull service");
                                String[] list = (String[]) result;
                                for (int i = 0; i < list.length; i++) {
                                        actList.addItem(list[i]);
                                }
                        }
                }

}





On 8 Ott, 00:17, Mark Murphy <[EMAIL PROTECTED]> wrote:
> Stefano Cannata wrote:
> > Actually I haven't published yet my webapp on a url,
>
> Hopefully, somebody on this list both has your version ofGWTinstalled
> and the time to build a test app.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> AndroidTraining on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to