Skip to content
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

CvCamera size when using navigation #33

Open
Albert-vill opened this issue Nov 20, 2020 · 1 comment
Open

CvCamera size when using navigation #33

Albert-vill opened this issue Nov 20, 2020 · 1 comment

Comments

@Albert-vill
Copy link

Albert-vill commented Nov 20, 2020

Hello, I´m trying to understand why using react navigator on my app is messing with the size of the CvCamera component.

I have defined a basic structure with the form of:
  <NavigationContainer>
      <Stack.Navigator
        initialRouteName="Camera"
        screenOptions={{headerShown: false}}>
        <Stack.Screen name="Camera" component={CustomCamera} />
      </Stack.Navigator>
    </NavigationContainer>

But when i open the camera screen the size is reduced. Which is something that doesnt happen if i simply open the camera.
I am using this stylesheet:

const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', position: 'absolute', width: '100%', height: '100%', }, preview: { alignItems: 'center', position: 'absolute', }, });

the framewidth and frameheight have a value of: 1280 and 960 and I am running the app on a Pixel 4 XL emulator from android studio.

This is the size of the camera when using navigation:

image

and this is the same when i dont use navigation:

image

@adamgf
Copy link
Owner

adamgf commented Nov 28, 2020

Hi @AlbertVc,
Can you please fix this? I added you as a collaborator to react-native-opencv3 and react-native-opencv3-tests. I do not know react-native layout stuff well enough to fix this kind of stuff.
Best regards,
Adam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants