-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Back Button Functionality #6
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR. I'll test it out before merging. |
Okay Thanks |
Have you checked my Code? |
src/index.js
Outdated
@@ -12,6 +12,7 @@ export default class AnimatedLoader extends React.PureComponent { | |||
animationStyle: {}, | |||
speed: 1, | |||
loop: true, | |||
backButtonPress: () => Backhandler.exitApp(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Backhandler' is not defined
Typo error.
@@ -63,7 +65,7 @@ export default class AnimatedLoader extends React.PureComponent { | |||
visible={visible} | |||
animationType={animationType} | |||
supportedOrientations={['portrait']} | |||
onRequestClose={() => {}} | |||
onRequestClose={backButtonPress} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'backButtonPress' is not defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backButtonPress is defined
Please check the comments I've made. and update the PR. Also, make sure the code works properly on both iOS and Android. It doesn't seems to working properly. Thanks. |
Thanks for Checking my Code and informing me about the mistake. Thank You for giving your time in checking my Code. |
Default behaviour of Back button will be exiting the App and User can pass his own function as a prop for custom behaviour of the component.