Ejemplo n.º 1
0
 @Override
 protected void onResume() {
   super.onResume();
   mView.onResume();
   mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);
   GodotLib.focusin();
 }
Ejemplo n.º 2
0
 @Override
 protected void onPause() {
   super.onPause();
   mView.onPause();
   mSensorManager.unregisterListener(this);
   GodotLib.focusout();
 }
Ejemplo n.º 3
0
  public void onVideoInit(boolean use_gl2) {

    //		mView = new GodotView(getApplication(),io,use_gl2);
    //		setContentView(mView);

    layout = new FrameLayout(this);
    layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    setContentView(layout);

    // GodotEditText layout
    GodotEditText edittext = new GodotEditText(this);
    edittext.setLayoutParams(
        new ViewGroup.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
    // ...add to FrameLayout
    layout.addView(edittext);

    mView = new GodotView(getApplication(), io, use_gl2, this);
    layout.addView(mView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    mView.setKeepScreenOn(true);

    edittext.setView(mView);
    io.setEdit(edittext);

    // Ad layout
    adLayout = new RelativeLayout(this);
    adLayout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    layout.addView(adLayout);
  }
Ejemplo n.º 4
0
  public void onVideoInit(boolean use_gl2) {

    //		mView = new GodotView(getApplication(),io,use_gl2);
    //		setContentView(mView);

    layout = new RelativeLayout(this);
    layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    setContentView(layout);
    mView = new GodotView(getApplication(), io, use_gl2, this);
    layout.addView(mView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    mView.setKeepScreenOn(true);
  }
Ejemplo n.º 5
0
  @Override
  protected void onPause() {
    super.onPause();
    if (!godot_initialized) {
      if (null != mDownloaderClientStub) {
        mDownloaderClientStub.disconnect(this);
      }
      return;
    }
    mView.onPause();
    mSensorManager.unregisterListener(this);
    GodotLib.focusout();

    for (int i = 0; i < singleton_count; i++) {
      singletons[i].onMainPause();
    }
  }
Ejemplo n.º 6
0
  @Override
  protected void onResume() {
    super.onResume();
    if (!godot_initialized) {
      if (null != mDownloaderClientStub) {
        mDownloaderClientStub.connect(this);
      }
      return;
    }

    mView.onResume();
    mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);
    GodotLib.focusin();

    for (int i = 0; i < singleton_count; i++) {

      singletons[i].onMainResume();
    }
  }