tags:

views:

29

answers:

1

I have added two list fields to a screen but on a change in focus it does not go to the second list horizontally.

alt text

class TestScreen extends MainScreen { private final ObjectListField listField = new ObjectListField(FIELD_LEFT) { public void layout(int width, int height) { super.layout(width,height); setExtent(Display.getWidth()/2, Display.getHeight()); }

     };
     private final ObjectListField listField2 = new ObjectListField(FIELD_RIGHT)
     {
         public void layout(int width, int height)
          {
            super.layout(width,height);
            setExtent(Display.getWidth()/2, Display.getHeight());
          }

     };
     private final String[] lines = { "Line 1", "Line 2", "Line 3", "Line 4", "Line 5", "Line 6" };
     private final String[] lines2 = { "Line 10", "Line 20", "Line 30", "Line 40", "Line 50", "Line 60" };
     TestScreen() 
     {
              super(NO_VERTICAL_SCROLL);
              HorizontalFieldManager hfm=new HorizontalFieldManager(Manager.HORIZONTAL_SCROLL);
              hfm.add(listField);
              hfm.add(listField2);
              listField.set(lines);
              listField2.set(lines2);
              add(hfm);

    }

}` i want on focus frim list 1 to list 2 it move horizontally .

+1  A: 
Tamar
can you give me code of your manger how you manage your focus please...
amit
@amit I added sample code and comments in the body of the answer.
Tamar