Merge pull request #2801 from corbt/back_button_android
handle back button press in JS
This commit is contained in:
commit
3b4845f93c
|
@ -44,6 +44,15 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
|
|||
return super.onKeyUp(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (mReactInstanceManager != null) {
|
||||
mReactInstanceManager.onBackPressed();
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invokeDefaultOnBackPressed() {
|
||||
super.onBackPressed();
|
||||
|
|
Loading…
Reference in New Issue