Skip to content

Commit 2d1481e

Browse files
committed
chore(demo): update demo
1 parent 2efb9e6 commit 2d1481e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

apps/demo/src/plugin-demos/firebase-admob.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export class DemoModel extends DemoSharedFirebaseAdmob {
4444
const hlv = view.getViewById('headLineView') as Label;
4545
const mv = view.getViewById('mediaView');
4646
const bv = view.getViewById('bodyView');
47-
console.log('nativeAdLayoutChanged', hlv.nativeView, mv.nativeView, bv.nativeView);
47+
const iv = view.getViewById('iconView');
48+
console.log('nativeAdLayoutChanged', hlv.nativeView, mv.nativeView, bv.nativeView, iv.nativeView);
4849
}
4950
nativeAdLoaded(event) {
5051
const view = event.object;
@@ -63,6 +64,9 @@ export class DemoModel extends DemoSharedFirebaseAdmob {
6364
mv.mediaContent = ad.mediaContent;
6465
const bv = view.getViewById('bodyView');
6566
bv.text = ad.body;
67+
const iv = view.getViewById('iconView');
68+
console.log(ad.icon);
69+
iv.src = ad.icon.image;
6670
view.nativeAd = ad;
6771
console.log('nativead loaded');
6872
} else if (event === 'adFailedToLoad') {

apps/demo/src/plugin-demos/firebase-admob.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ xmlns:ui="@nativescript/firebase-admob"
88
<StackLayout class="p-20">
99
<!-- <ui:BannerAd height="100" width="100" unitId="{{bannerAdUnit}}" layoutChanged="{{bannerLoaded}}"/> -->
1010
<ui:NativeAdView height="400" loaded="{{nativeAdLoaded}}" layoutChanged="{{nativeAdLayoutChanged}}">
11-
<GridLayout rows="auto,auto,auto" height="300" width="300">
11+
<GridLayout rows="auto,auto,auto,auto" height="300" width="300">
1212
<Label id="headLineView" text="First"/>
1313
<ui:MediaView row="1" id="mediaView" height="100%"/>
1414
<Label row="2" id="bodyView"/>
15+
<Image id="iconView" row="3"/>
1516
</GridLayout>
1617
</ui:NativeAdView>
1718
</StackLayout>

0 commit comments

Comments
 (0)