Comments (5)
Hey guys. I had the same issue and I fixed my issue just by switching the order.
What I used to have based on README.md
...
render() {
const { navigation } = this.props;
return (
<View style={{ flex: 1 }}>
<NotificationPopup ref={popup => this.popup = popup} />
<SwitchNavigator navigation={navigation} />
</View>
);
}
}
What I have now:
...
render() {
const { navigation } = this.props;
return (
<View style={{ flex: 1 }}>
<SwitchNavigator navigation={navigation} />
<NotificationPopup ref={popup => this.popup = popup} />
</View>
);
}
}
Just by switching the order of my Navigator
and the NotificationPopup
, the popup is now showing for Android.(And of course works fine for iOS)
If this fixed your issue. I think we can ask @carsonwah to update the README's example code.
from react-native-push-notification-popup.
Hi @peachlsy , could you provide more details for further investigation? Such as:
emulator: (android studio/geny motion)
device: (samsung, ...)
android version:
react native version:
react-native-push-notification-popup version:
etc
from react-native-push-notification-popup.
Hi @carsonwah
Thank you for your reply. Here are my environment:
emulator: android studio
device: pixel 3
android version: API 28, Android 9.0(Google APIs)
CPU: x86
react native version: 0.59.8
react-native-push-notification-popup version: ^1.3.0
Thanks!
from react-native-push-notification-popup.
Hi Carson,
I'm also experiencing the same issue on my physical device. I'm using a
Device: Xiaomi Redmi Note 3
react-native version: 0.33.0
react-native-push-notification-popup version: ^1.3.0
from react-native-push-notification-popup.
Hi guys, sorry for the late reply.
We are currently using zIndex
to display the popup at the front of the scrren. It works well on iOS, but causes issues on Android.
Related discussions:
- how to give z-index property in react native android app
- zIndex isn't working for a react native project
- React native: zIndex not taken seriously on Android
- zIndex does not work with dynamic components on Android
Solution 1
Add elevation
to popupContainer component. But this may introduces some unwanted styles.
Solution 2
From Official Doc on zIndex:
Normally, you don't use zIndex. Components render according to their order in the document tree, so later components draw over earlier ones.
So as a workaround, maybe we can remove the use of zIndex
completely, and make sure users use the component in correct order in the render method.
I will try that soon. Any comment or pull request is welcome.
from react-native-push-notification-popup.
Related Issues (20)
- Use globally HOT 7
- Thanks for creating it ! HOT 2
- action pop up HOT 1
- Show dynamic notification HOT 1
- onPress don´t work with react-navigation HOT 3
- How to show the Notification in any screen with by calling this.popup.show() Method only once at particular screen HOT 1
- BUG, On Android the pop up closes very fast after slide out HOT 2
- Hide / disable popup on certain components HOT 2
- Add more control HOT 1
- How to use this with functional component? HOT 1
- Does DefaultPopup body support html? HOT 1
- " null is not an object (evaluating '_this2.popup.show')" HOT 1
- Pop-up is too low on Android HOT 4
- Undefined is not a function evaluation (popup.show...) HOT 4
- Popup in Background and Kill state do not appear HOT 1
- Support iPhone 14 Pro/Pro Max Dynamic Island HOT 1
- how to manually dismiss the popup?
- Display multiple popups? HOT 7
- Popup is not aligned to the center of the screen HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-push-notification-popup.