Skip to content
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

Toast message not showing in Android devices #69

Open
akhilsanker opened this issue Mar 1, 2019 · 8 comments
Open

Toast message not showing in Android devices #69

akhilsanker opened this issue Mar 1, 2019 · 8 comments

Comments

@akhilsanker
Copy link

Hi,
Using react-native-easy-toast": "^1.1.0, toast position bottom, the toast message is not appearing in Android devices but works fine in iOS devices.

Does anyone have any workaround to solve this issue? Any suggestion is appreciable.

Thanks

@sesm
Copy link

sesm commented Mar 15, 2019

Are you rotating the screen? There is a know issue with screen rotation, see #56

@akhilsanker
Copy link
Author

Hi @sesm ,
Thanks for your response and is well appreciated.
My app has both portrait and landscape mode, but its not working in any orientation.

Thanks

@sesm
Copy link

sesm commented Mar 15, 2019

Does the toast show up with position: 'top'? If yes, then it may be the same issue anyway.

@akhilsanker
Copy link
Author

Hi @scue ,

Its position: 'top'.
Do you have any workaround to solve this problem?

Thanks

@sesm
Copy link

sesm commented Mar 15, 2019

No, I never had any problems with this library for position: 'top'

@maximus123123
Copy link

zIndex?

@maximus123123
Copy link

maximus123123 commented Apr 3, 2019

This is working on android with position 'bottom' (none rotated screen through).
I made the toast component in my app.js just below my appcontainer from react navigation, then I made a deviceemitter listener, which from other screens I emit the 'toast'

This will allow the toast to show even when changing screen

componentDidMount(){
    DeviceEventEmitter.addListener('toast', (e) => {
      this.refs.toast.show(e);
    });
}
render(){
return(
      <View style={{flex: 1}}>
      <AppContainer/>
      <Toast position='bottom' ref="toast"/>
      </View>)
}

.......
on another screen:
    DeviceEventEmitter.emit('toast', 'Some Message');

@akhilsanker
Copy link
Author

Hi @maximus12312,

I have emitted the event from the screen, in which the toast is shown, but it is not working.
Do I need to emit the event from app.js file itself.
Or do you have any other workaround.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants