public override void init(java.lang.Object n1) {
     instance = this;
     dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {
         HardwareButtons.BackPressed += page_BackKeyPress;
         cl.ManipulationMode = ManipulationModes.All;
         screen.PointerPressed += new PointerEventHandler(LayoutRoot_PointerPressed);
         screen.PointerReleased += new PointerEventHandler(LayoutRoot_PointerReleased);
         screen.PointerMoved += new PointerEventHandler(LayoutRoot_PointerMoved);
     }).AsTask().GetAwaiter();
     ((com.codename1.ui.Display)com.codename1.ui.Display.getInstance()).getDragSpeed(true);
     _sensor = SimpleOrientationSensor.GetDefault();
     _sensor.OrientationChanged += new TypedEventHandler<SimpleOrientationSensor, SimpleOrientationSensorOrientationChangedEventArgs>(app_OrientationChanged);
     ((com.codename1.ui.Display)com.codename1.ui.Display.getInstance()).setTransitionYield(0);
     setDragStartPercentage(3);
 }
 public void @this()
 {
     base.@this();
     instance = this;
 }
 public override void init(java.lang.Object n1)
 {
     instance = this;
     System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
     {
         app.BackKeyPress += page_BackKeyPress;
         Touch.FrameReported += new TouchFrameEventHandler(Touch_FrameReported);
         app.SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;
         app.OrientationChanged += app_OrientationChanged;
     });
 }