Help Center

Local Navigation

Receive notification when the orientation of the touch screen changes

  1. Import the net.rim.device.api.ui.Manager class.
  2. Override net.rim.device.api.ui.Manager.sublayout(int, int).
    protected void sublayout(int width, int height) {
    int x = 0;
    int y = 0;
    Field field;
    int numberOfFields = getFieldCount();
    for (int i=0; i<numberOfFields; ++i) {
     field = getField(i); 
     layoutChild(field, width, height);
     setPositionChild(field, x, y);
     field.setPosition(x,y);
     x += field.getPreferredWidth();
     y += field.getPreferredHeight();
     }
    setExtent(width,height);
    }                  
    

Index


Was this information helpful? Send us your comments.