@@ -19,46 +19,14 @@ export class NativeAdView extends NativeAdViewBase implements AddChildFromBuilde
19
19
}
20
20
21
21
_addChildFromBuilder ( name : string , value : any ) : void {
22
- if ( value instanceof View ) {
23
- this . _child = value ;
24
- }
22
+ this . content = value ;
25
23
}
26
24
27
- public eachChildView ( callback : ( child : View ) => boolean ) : void {
28
- if ( this . _child ) {
29
- callback ( this . _child ) ;
30
- }
31
- }
32
-
33
- public onMeasure ( widthMeasureSpec : number , heightMeasureSpec : number ) : void {
34
- const result = View . measureChild ( this , this . _child , widthMeasureSpec , heightMeasureSpec ) ;
35
-
36
- const width = Utils . layout . getMeasureSpecSize ( widthMeasureSpec ) ;
37
- const widthMode = Utils . layout . getMeasureSpecMode ( widthMeasureSpec ) ;
38
-
39
- const height = Utils . layout . getMeasureSpecSize ( heightMeasureSpec ) ;
40
- const heightMode = Utils . layout . getMeasureSpecMode ( heightMeasureSpec ) ;
41
-
42
- const measureWidth = Math . max ( result . measuredWidth , this . effectiveMinWidth ) ;
43
- const measureHeight = Math . max ( result . measuredHeight , this . effectiveMinHeight ) ;
44
-
45
- const widthAndState = View . resolveSizeAndState ( measureWidth , width , widthMode , 0 ) ;
46
- const heightAndState = View . resolveSizeAndState ( measureHeight , height , heightMode , 0 ) ;
47
-
48
- this . setMeasuredDimension ( widthAndState , heightAndState ) ;
49
- }
50
-
51
- public onLayout ( left : number , top : number , right : number , bottom : number ) : void {
52
- View . layoutChild ( this , this . _child , 0 , 0 , right - left , bottom - top ) ;
53
- }
54
-
55
- onLoaded ( ) {
56
- super . onLoaded ( ) ;
57
- if ( this . _child ) {
58
- this . _addView ( this . _child ) ;
59
- this . _native . addSubview ( this . _child . nativeView ) ;
60
- }
61
- }
25
+ // public eachChildView(callback: (child: View) => boolean): void {
26
+ // if (this._child) {
27
+ // callback(this._child);
28
+ // }
29
+ // }
62
30
63
31
_adChoicesView : View ;
64
32
get adChoicesView ( ) : View {
@@ -376,6 +344,9 @@ export class NativeAd implements INativeAd {
376
344
return MediaContent . fromNative ( this . native ?. mediaContent ) ;
377
345
}
378
346
347
+ get customMuteThisAdAvailable ( ) {
348
+ return this . native . customMuteThisAdAvailable ;
349
+ }
379
350
isCustomClickGestureEnabled ( ) : boolean {
380
351
return this . native ?. customClickGestureEnabled ;
381
352
}
@@ -433,6 +404,12 @@ export class NativeAd implements INativeAd {
433
404
return result ;
434
405
}
435
406
407
+ muteThisAdWithReason ( reason : MuteThisAdReason ) {
408
+ if ( reason ?. native ) {
409
+ this . native ?. muteThisAdWithReason ?.( reason . native ) ;
410
+ }
411
+ }
412
+
436
413
get images ( ) {
437
414
const result = [ ] ;
438
415
const images = this . native ?. images ;
0 commit comments