Giter Site home page Giter Site logo

rnsurfaceviewissue's Introduction

View render issue when using surfaceview in react-native

issue facebook/react-native#14818

There is a compatible render issue when using surfaceview and flexbox.

When we wrap a surfaceview with container using flexbox (flex:1) style, the other view using position:'absolute' will not be render.

When we change the container's style to StyleSheet.absoluteFill, it works, but only if we do not use the shadow style ( shadowColor: 'balck')

Expect Result

App launch and shows a camera preview, and a yellow box in the middle of screen will be shown after 3s.

When click the yellow box, the box will be dismiss, and a on click string will be output in the console.

Like the picture below:

img

Fail Result

The yellow box will not be shown, but when we click on the middle of screen, the on click string is output in the console.

It seems that yellow box view is layout (and it is clickable) but not render to screen.

Test step

Just run the app (with commandline react-native run-android) to see the success case.

uncommonet the style in index.js to see the fail case.

Test reocrd

�react-native:0.45.1

�flex+surfaceview

Phone System ver. Result
Nexus 5 5.1.1 pass
Nexus 6P 6.0.1 pass
Redmi 3x 6.0.1 fail
Galaxy Note 3 5.0 fail
EVA-AL00 7.0 pass

rnsurfaceviewissue's People

Contributors

luhui avatar

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.