예제 #1
0
 @Override
 protected void onResume() {
   super.onResume();
   mView.onResume();
   mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);
   GodotLib.focusin();
 }
예제 #2
0
 @Override
 protected void onPause() {
   super.onPause();
   mView.onPause();
   mSensorManager.unregisterListener(this);
   GodotLib.focusout();
 }
예제 #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);
  }
예제 #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);
  }
예제 #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();
    }
  }
예제 #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();
    }
  }