ilink-world/app/screens/ads/BannerAds.js

77 lines
2.4 KiB
JavaScript
Raw Permalink Normal View History

2020-04-20 10:43:01 +00:00
import React, { Component } from 'react';
2019-06-16 13:09:54 +00:00
import PropTypes from 'prop-types';
import {
2020-04-20 10:43:01 +00:00
Platform, StyleSheet, Text,
TouchableWithoutFeedback, View, TextInput,
WebView,
Animated, Dimensions, Image, PermissionsAndroid,
StatusBar, TouchableNativeFeedback, TouchableOpacity, BackHandler, Alert, ProgressBarAndroid
, NativeModules, Picker, FlatList
2019-06-16 13:09:54 +00:00
} from 'react-native';
import CardView from "react-native-cardview"
2020-04-20 10:43:01 +00:00
import { responsiveHeight, responsiveWidth } from "react-native-responsive-dimensions"
2019-06-16 13:09:54 +00:00
import BaseScreen from "../BaseScreen";
import Icon from "react-native-vector-icons/MaterialIcons";
import Button from "apsl-react-native-button"
2020-04-20 10:43:01 +00:00
const route = require("./../../route.json")
2019-06-16 13:09:54 +00:00
const BannerAds = (props) => {
2020-04-20 10:43:01 +00:00
const { children, hide, style } = props;
if (hide) {
return null;
}
return (
<View {...this.props} style={style}>
<View style={styles.parent} >
<CardView style={styles.container}>
<Icon.Button
name={"close"}
color={"white"}
onPress={() => {
this.hide = true
}}
style={{ borderRadius: 0 }}
>Fermer</Icon.Button>
<WebView
source={{ uri: 'https://github.com/facebook/react-native' }}
style={{ flex: 1 }}
/>
</CardView>
</View></View>
);
2019-06-16 13:09:54 +00:00
}
BannerAds.propTypes = {
2020-04-20 10:43:01 +00:00
children: PropTypes.oneOfType([
PropTypes.string,
PropTypes.element,
PropTypes.number,
PropTypes.arrayOf(PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
PropTypes.element,
])),
]).isRequired,
hide: PropTypes.bool,
2019-06-16 13:09:54 +00:00
};
2020-04-20 10:43:01 +00:00
const styles = StyleSheet.create({
container: {
flex: 1,
2019-06-16 13:09:54 +00:00
2020-04-20 10:43:01 +00:00
width: responsiveWidth(100),
height: responsiveHeight(15),
2019-06-16 13:09:54 +00:00
2020-04-20 10:43:01 +00:00
justifyContent: 'center',
backgroundColor: "white"
},
parent: {
width: responsiveWidth(100),
height: responsiveHeight(15),
justifyContent: 'center',
alignItems: 'center',
backgroundColor: "#000000AE"
}
2019-06-16 13:09:54 +00:00
})
2020-04-20 10:43:01 +00:00
export default BannerAds