Class ScreenOrientationListener

This interface is implemented by classes that wish to receive screen orientation changes.

Methods

See Also

Screen

screen orientation changed to <Orientation o>

Called when the screen orientation changes.

Parameters

Example

main
  // Construct and run an origo application.
  system.run application new MyApplication


class MyApplication extends Application implements ScreenOrientationListener
  
  MyApplication 
    screen.add screen orientation listener this
  
  screen orientation changed to <orientation o>
    if ( o == PORTRAIT )
      print "screen changed to portrait mode"
    if ( o == LANDSCAPE )
      print "screen changed to landscape mode"