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