Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Banner size is not updated after screen size changes #43

Open
raspberry-jenshen opened this issue Jul 18, 2023 · 3 comments
Open

Banner size is not updated after screen size changes #43

raspberry-jenshen opened this issue Jul 18, 2023 · 3 comments

Comments

@raspberry-jenshen
Copy link

raspberry-jenshen commented Jul 18, 2023

Hello,

I've found an issue that the banner isn't updated after the screen size was changed.

Preconditions:
I try to use maximum space for the banner widget.
So, my banner size depends on the screen size.

Widget example:

AppodealBanner(
      adSize: AppodealBannerSize(
        width: banner.size.width.round(),
        height: banner.size.height.round(),
        name: 'BANNER',
      ),
    )

When you rotate the device we have to update the banner size but nothing changes.

How to resolve the issue:

@override
  void didUpdateWidget(AppodealBanner oldWidget) {
    super.initState(oldWidget);
    if (widget.adSize != oldWidget.adSize) {
      setState(() {
        adSize = Future.value(Size(
          widget.adSize.width.toDouble(),
          widget.adSize.height.toDouble(),
        ));
      });
    }

  }

photo_2023-07-18_14-08-35

Not updated size after rotation.
photo_2023-07-18_14-08-41

@da2gl
Copy link
Collaborator

da2gl commented Jul 19, 2023

Hello @JenshenSoft.
We have started investigating your issue.
Unfortunately, our banner views do not currently support smart behavior, only fixed size. This is described here.

Could you please provide more details about your use case for banners?
It seems that you can simply use the method Appodeal.show(AppodealAdType.BannerTop); More information here.

Thank you.

@raspberry-jenshen
Copy link
Author

Thanks for your answer!

Just to clarify.

If I use positioned banners (AppodealAdType.BannerTop, etc..):

  • I don't need to use the AppodealBanner widget
  • Banner only limited with screen size and I can't change this behavior (like adding paddings)

Thanks in advance!

@da2gl
Copy link
Collaborator

da2gl commented Jul 20, 2023

@raspberry-jenshen Hi.

I don't need to use the AppodealBanner widget

Yes

Banner only limited with screen size and I can't change this behavior (like adding paddings)

Yes, unfortunately, you can't change any banner presentation in any way.
About the size of the banner width - it may depend on the ad network. For example, AdMob supports full width, but Bidmachine ad network doesn't.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants