Merge pull request #2801 from corbt/back_button_android

handle back button press in JS
This commit is contained in:
Felix Oghină 2015-09-17 14:21:32 +01:00
commit 3b4845f93c
1 changed files with 9 additions and 0 deletions

View File

@ -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();