Open SPxiaomin-zz opened 8 years ago
+1, worked fine with react-native 0.24 but with 0.29.2 I get the same behavior. Looks like something is there coz if you add a custom width/height in an enclosing View you can get a red box in the top ~ the number of pixels you defined
@agiamas you are using react-native-navigation combined with react-native-barcodescanner, really ?
because it extends RootActivity.so MainApplication will not work.find react-native-navigation in node_modules.Override getPackages() method in RootActivity.Then Override getPackages method in MainActivity in you Application.
@liujibin1836591303 sorry, I'm almost a newbie in Java. can you describe more minutely. Or If it is convenient for you, you can show me the code directly.
Thx in advance.
@SPxiaomin QQ:1836591303
I don't think this is related to your navigation solution. I had the same problem and these props solved it for me. This removes the viewfinder in the camera image, but you can give children if you want to make your own.
<BarcodeScanner
onBarCodeRead={this.props.onBarCodeRead}
viewFinderBorderWidth={Dimensions.get('window').width}
viewFinderBorderLength={Dimensions.get('window').height}
viewFinderBorderColor={transparent}
style={{flex: 1}}
/>
@ThaJay It works!
following the instruction, I install the react-native-barcodescanner, and it work well without react-native-navigation. But, when it comes to react-native-navigation and I create a individual page for the react-native-barcodescanner to work, it cann't work well. When i go to the page by pressing a button on a another page, It only show a red line on the left, nothing else.
Plz help me~ thx in advance~