Skip to content

[Android] Cannot toggle pointerEvents + opacity on View #10216

@joncursi

Description

@joncursi

I am trying to toggle an Overlay in and out over scene content. The below code works perfectly on iOS but will not show the overlay at all on Android. According to the react-native documentation:

Thoughts?

import { View } from 'react-native';

...

<View
  pointerEvents={condition ? 'auto' : 'none'}
  style={{
    opacity: condition ? 1 : 0,
  }}
>
  <Text>This toggles properly on iOS, but never displays on Android. Bug?</Text>
</View>

I originally spotted this while attempting to animate via react-native-animatable (please see oblador/react-native-animatable#57), but since the same issue is present on the normal View component, I believe this may be an issue with react native itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions