Ad
How To Create A Custom UI On The Transparent View Of React Native?
How to Create similar User Interface like http://uupload.ir/files/3oar_capture.png in react-native? my problem is that I cant build it on top of screen and it gets rendered under the screen. http://uupload.ir/files/05rm_photo_2019-11-16_15-02-06.jpg
how shall I tackle this? if I put my custom component inside the react camera like the barcode mask it is not rendered or show.
render() {
return (
<React.Fragment>
<RNCamera
ref={ref => {
this.camera = ref;
}}
style={{
flex: 1,
width: '100%',
}}
onGoogleVisionBarcodesDetected={this.barcodeRecognized}>
<BarcodeMask
width={250}
height={250}
edgeBorderWidth={2}
edgeColor={'#840F53'}
/>
</RNCamera>
<Text>Test component</Text>
</React.Fragment>
);
}
}
QRCodeBuyScreen.navigationOptions = () => ({
title: 'بارکد',
header: null,
tabBarIcon: ({tintColor}) => (
<Icon name="qrcode-scan" size={30} color={tintColor} />
),
});
const styles = StyleSheet.create({
})
export default QRCodeBuyScreen;
Ad
Answer
I would suggest you to use Modals provided by react-native, it comes with transparent prop. After that you can customise it however you want.
Ad
source: stackoverflow.com
Related Questions
- → Import statement and Babel
- → should I choose reactjs+f7 or f7+vue.js?
- → Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined
- → .tsx webpack compile fails: Unexpected token <
- → React-router: Passing props to children
- → ListView.DataSource looping data for React Native
- → React Native with visual studio 2015 IDE
- → Can't test submit handler in React component
- → React + Flux - How to avoid global variable
- → Webpack, React & Babel, not rendering DOM
- → How do I determine if a new ReactJS session and/or Browser session has started?
- → Alt @decorators in React-Native
- → How to dynamically add class to parent div of focused input field?
Ad