Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pointer-events style ignored on Android #1294

Open
Assignees
matinzd
@itsramiel

Description

@itsramiel

Description

Hi,

I would like to have a lottie view which covers the entire screen and allow touches underneath. To allow touches underneath, I would passpointer-events:none which works nicely on iOS, but not on Android.

Screen.Recording.2024-10-25.at.9.14.26.AM.mov

Sample code, also available inlinked repo:

importLottieViewfrom'lottie-react-native';import{Alert,Button,SafeAreaView,StyleSheet,View}from'react-native';functionApp(){return(<SafeAreaViewstyle={styles.screen}><Buttontitle="Press Me"onPress={()=>Alert.alert('Hey!')}/><LottieViewstyle={styles.lottie}source={require('./assets/Animation - 1729763779569.json')}autoPlayloop/></SafeAreaView>);}conststyles=StyleSheet.create({screen:{flex:1,backgroundColor:'#fff',},lottie:{    ...StyleSheet.absoluteFillObject,pointerEvents:'none',},});exportdefaultApp;

Note that the workaround is easy and that is to wrap the lottie view in another view and set the pointer events there to none which is what I do for now, but I would like the lottie view to work on its own too

Steps to reproduce

  1. Clone repo
  2. Run on Android
  3. Try clicking on the button behind the lottie view

Snack or a link to a repository

https://github.com/itsramiel/AndroidLottie

Lottie React Native version

7.0.0

React Native version

0.75.4

Platforms

Android

Workflow

React Native

Architecture

Paper (Old Architecture)

Build type

Debug app & dev bundle

Device

Android emulator

Acknowledgements

Yes

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp