【问题标题】:Admob Banner position wrong(Unity3d)Admob 横幅位置错误(Unity3d)
【发布时间】:2018-12-14 22:11:21
【问题描述】:

当我点击文本框时。 底部位置变化。

测试设备: 三星笔记 10.1 安卓 4.1.2 统一 5.6.5p4

请观看视频。 https://www.youtube.com/watch?v=z9r64f5_66s

谢谢

【问题讨论】:

    标签: unity3d admob


    【解决方案1】:

    来自AdMob documentation:

    为了更好地控制 BannerView 的位置 放置在屏幕上而不是 AdPosition 值提供的内容,请使用 以 x 和 y 坐标为参数的 BannerView 构造函数:

    // Create a 320x50 banner ad at coordinate (0,50) on screen.
    BannerView bannerView = new BannerView(adUnitId, AdSize.Banner, 0, 50);
    The top-left corner of the BannerView will be positioned at the x and y values passed to the constructor, where the origin is the top-left of the screen.
    

    【讨论】:

    • 尝试在活动结束后重置横幅,它应该会回到开始/期望的位置。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多