Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Jul 9, 2020
1 parent 9e285bd commit 858c8d8
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions example/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const App = () => {

const _onUnifiedNativeAdLoaded = (event) => {
console.log('Views have populated with the Ad');
console.log(event.aspectRatio);
setAdLoaded(true);
setAspectRatio(event.aspectRatio);
};
Expand All @@ -67,25 +68,13 @@ const App = () => {
width: '95%',
alignSelf: 'center',
}}
delayAdLoading={10000}
adUnitID={NATIVE_AD_ID} // REPLACE WITH NATIVE_AD_VIDEO_ID for video ads.
>
<View
style={{
width: '100%',
}}>
<View
style={{
width: '100%',
height: 100,
backgroundColor: '#f0f0f0',
justifyContent: 'center',
alignItems: 'center',
position: adLoaded ? 'relative' : 'absolute',
display: adLoaded ? 'none' : 'flex',
}}>
<Text>Loading an Ad</Text>
</View>

<View
style={{
height: 100,
Expand All @@ -94,7 +83,6 @@ const App = () => {
justifyContent: 'flex-start',
alignItems: 'center',
paddingHorizontal: 10,
display: !adLoaded ? 'none' : 'flex',
}}>
<IconView
style={{
Expand Down Expand Up @@ -148,7 +136,6 @@ const App = () => {
width: '100%',
height: 400 / aspectRatio,
backgroundColor: 'white',
display: !adLoaded ? 'none' : 'flex',
}}
/>
</View>
Expand Down

0 comments on commit 858c8d8

Please sign in to comment.