mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
3.3 KiB
3.3 KiB
id, title, original_id
| id | title | original_id |
|---|---|---|
| version-0.31-backandroid | backandroid | backandroid |
BackAndroid #
Detect hardware back button presses, and programmatically invoke the default back button functionality to exit the app if there are no listeners or if none of the listeners return true.
Example:
BackAndroid.addEventListener('hardwareBackPress', function() {
if (!this.onMainScreen()) {
this.goBack();
return true;
}
return false;
});
Methods #
You can edit the content above on GitHub and send us a pull request!