Browse Source

add banner in screens

feature/admob
dslak 2 years ago
parent
commit
1c6cc99a93
  1. BIN
      builds/VDS-Quiz-364bf545b3fe4b068b03bed4c78d0461-signed.aab
  2. BIN
      builds/VDS-Quiz-7c9b0c81f6ce4207838ccd204b6f2234-signed.aab
  3. BIN
      builds/application-90a530f9-d8c4-49b9-a848-2f2b8bd54e1a.aab
  4. 16
      vds-app/App/components/Banner.js
  5. 8
      vds-app/App/screens/Quiz.js

BIN
builds/VDS-Quiz-364bf545b3fe4b068b03bed4c78d0461-signed.aab

Binary file not shown.

BIN
builds/VDS-Quiz-7c9b0c81f6ce4207838ccd204b6f2234-signed.aab

Binary file not shown.

BIN
builds/application-90a530f9-d8c4-49b9-a848-2f2b8bd54e1a.aab

Binary file not shown.

16
vds-app/App/components/Banner.js

@ -9,18 +9,28 @@ const screen = Dimensions.get("window")
const styles = StyleSheet.create({
container: {
//backgroundColor: colors.yellow,
backgroundColor: colors.yellow,
flex: 1,
alignItems: "center",
justifyContent: "center",
marginVertical: 20
marginTop: 20,
height: 150,
width: "100%"
}
})
export const Banner = () => {
let banner
if(__DEV__) {
banner = <Text>DEV BANNER</Text>
} else {
banner = <BannerAd size={BannerAdSize.BANNER} unitId={adUnitId} />
}
return (
<View style={styles.container}>
<BannerAd size={BannerAdSize.ADAPTIVE_BANNER} unitId={adUnitId} />
{banner}
</View>
)
}

8
vds-app/App/screens/Quiz.js

@ -44,7 +44,7 @@ const styles = StyleSheet.create({
},
scrollView: {
//margin: 10,
height: screen.height-150
height: screen.height-20
},
bg: {
width: "100%",
@ -257,14 +257,14 @@ class Quiz extends React.Component {
</SafeAreaView>
: <SafeAreaView></SafeAreaView>}
<View style={styles.bannerContainer}>
<Banner />
</View>
</ScrollView>
</View>
</View>
<View style={styles.bannerContainer}>
<Banner />
</View>
</ImageBackground>
)
}

Loading…
Cancel
Save