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

Update ToastAndroid with changes in Android 11 #4213

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pafry7
Copy link

@pafry7 pafry7 commented Sep 10, 2024

showWithGravity and showWithGravityAndOffset from ToastAndroid does not work for text toasts as of Android 11. ToastModule uses setGravity which is no-op. More information can be found here:

An alternative implementation could use setView, but:

  1. It is depracated
  2. Custom toasts from the background are blocked

Android documentation specifies snackbar and notifications as alternatives to toasts. link

- `setGravity` is no-op when called on text toasts.
Copy link

netlify bot commented Sep 10, 2024

Deploy Preview for react-native ready!

Name Link
🔨 Latest commit 81622f7
🔍 Latest deploy log https://app.netlify.com/sites/react-native/deploys/66dffbd3ef9f190008c3e87b
😎 Deploy Preview https://deploy-preview-4213--react-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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

Successfully merging this pull request may close these issues.

2 participants