Giter Site home page Giter Site logo

Comments (5)

sungsong88 avatar sungsong88 commented on July 18, 2024 1

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.

carsonwah avatar carsonwah commented on July 18, 2024

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.

peachlsy avatar peachlsy commented on July 18, 2024

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.

martin9908 avatar martin9908 commented on July 18, 2024

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.

carsonwah avatar carsonwah commented on July 18, 2024

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:

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.