/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View,TouchableOpacity} from 'react-native';
import QRScannerView from './qr';
export default class DefaultScreen extends Component {
render() {
return (
< QRScannerView
onScanResultReceived={this.barcodeReceived.bind(this)}
renderTopBarView={() => this._renderTitleBar()}
renderBottomMenuView={() => this._renderMenu()}
/>
)
}
_renderTitleBar(){
return(
这里添加标题
);
}
_renderMenu() {
return (
这里添加底部菜单
)
}
barcodeReceived(e) {
Toast.show('Type: ' + e.type + '\nData: ' + e.data);
//console.log(e)
}
}