handle back button press in JS
This commit is contained in:
parent
a88a134b13
commit
88add08c2e
|
@ -44,6 +44,15 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
|
||||||
return super.onKeyUp(keyCode, event);
|
return super.onKeyUp(keyCode, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
if (mReactInstanceManager != null) {
|
||||||
|
mReactInstanceManager.onBackPressed();
|
||||||
|
} else {
|
||||||
|
super.onBackPressed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void invokeDefaultOnBackPressed() {
|
public void invokeDefaultOnBackPressed() {
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
|
|
Loading…
Reference in New Issue