Closed Junior-OliveiraDeveloper closed 3 years ago
Have you tried to reload the banner when the orientation is changed?
I didn't try, I'll do it today and come back here. Thank's for your time.
Hi!
This way it worked. I don't know if it's the best option. stkAds is a stackLayout
protected override void OnSizeAllocated(double width, double height)
{
base.OnSizeAllocated(width, height);
if(_width != width)
{
_width = width;
var ads = new MTAdView();
if (Device.Idiom == TargetIdiom.Phone) ads.HeightRequest = 50;
else if (Device.Idiom == TargetIdiom.Tablet) ads.HeightRequest = 90;
stkAds.Children.Clear();
stkAds.Children.Add(ads);
}
}
The banner width does not change when rotating the device Steps to reproduce the behavior: Screenshots added I'm not sure I'm missing somethin g.