FalsinSoft / QtAndroidTools

A library to manage Android from QML
MIT License
266 stars 81 forks source link

Admob Banner looks broken in landscape #3

Closed edips closed 5 years ago

edips commented 5 years ago

Hi. I try to use banner , it looks good in portrait but when switching in landscape mode it looks broken. İs there any way to align it to horizontal center in the rectangle? Thanks. Screenshot_2019-04-30-20-00-48-526_com falsinsoft QtAndroidToolsDemo Screenshot_2019-04-30-20-00-38-711_com falsinsoft QtAndroidToolsDemo

edips commented 5 years ago

I deleted Rectangle, it works great only with Banner now. Page's height can dynamically change depending on the banner, this is perfect for my app. Thanks for the project.

QtAndroidAdMobBanner {
            id: banner2
            Layout.alignment: Qt.AlignTop
            unitId: "ca-app-pub-xxxxxxxxxxxxxx/xxxxx"
            type: QtAndroidAdMobBanner.TYPE_SMART_BANNER
            onLoaded: appPage.topPadding = banner2.height
            onClosed: appPage.topPadding = 0
        }