-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Holes have black background on android devices since 0.75.1 #37
Comments
Same here |
same on react-native 0.75.3. |
Same issue here! |
+1 |
1 similar comment
+1 |
Anybody tried it on 0.75.0 version of react? Just to narrow down the source of the problem? |
Guys, we’re sorry, but we’re currently unable to address this issue as our main project is still on React <0.70. If anyone is able to fix it and submit a PR, we’d greatly appreciate it! |
For others blocked by this problem: I was able to replace my usage of RHNV with SVG based masking: import React from 'react';
import { View, StyleSheet } from 'react-native';
import Svg, { Rect, Circle, Mask, Defs } from 'react-native-svg';
const HoleView = () => {
return (
<View style={styles.container}>
<Svg height="100%" width="100%">
<Defs>
<Mask id="mask" x="0" y="0" width="100%" height="100%">
<Rect width="100%" height="100%" fill="white" />
<Circle cx="100" cy="100" r="50" fill="black" />
</Mask>
</Defs>
<Rect width="100%" height="100%" fill="rgba(0, 0, 0, 0.8)" mask="url(#mask)" />
</Svg>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
});
export default HoleView; It's not drop-in, and I have not been able to animate the movement of the hole. Also, I don't need touch access through the hole, just visual appearance. |
An ugly hack that worked for me. Step 1. Remove RN background:
Step 2. Patch
I took the code from here. Not sure about performance. -- Another idea. Still requires clear RN background style. Instead of drawing the holes, let 's draw the background. Here is the paint object code:
Then the path creation starts with a background rect:
And all
|
Error
On android devices the holes are black with zero opacity since react native 0.75.1 upgrade. It was working fine on 0.74.6.
Steps to reproduce
sample repo: https://github.com/bnemeth-parkl/RNHoleViewBlackHoleDemo
The text was updated successfully, but these errors were encountered: