简体   繁体   English

Madserve SDK android:在中心显示插页式广告并添加关闭按钮

[英]Madserve SDK android: Display Interstitial ad at center and adding close button to in

If anyone used Madserve SDk for android then do suggest answer. 如果有人使用Madserve SDk for android那么建议回答。 I am using open source madserver SDK for android devices, Which Fetch ad from madserver host. 我正在为Android设备使用开源madserver SDK,它从madserver主机获取广告。 Its an open source project but no one is replying on its form or github. 它是一个开源项目,但没有人回复它的形式或github。 I stuck in SDK to display full screen interstitial ads at center. 我坚持使用SDK在中心显示全屏插页式广告。 It is displayed on top left corner. 它显示在左上角。

-Thanks -谢谢

In Madserve SDK the ad is displayed within the webview so the ad is content inside Webview and even centering webview content will be always displayed as it is Loaded(for large screen devices at Left corner). 在Madserve SDK中,广告显示在网页浏览中,因此广告是Webview中的内容,甚至中心网页视图内容也会在加载时显示(对于左下角的大屏幕设备)。

So I have used some CSS tricks to position the ad at center, where we add code for Image Banner in Madserve I added Following CSS code in HTML banner code to make it display always at center, 所以我使用了一些CSS技巧将广告定位在中心,我们在Madserve中为Image Banner添加代码我在HTML横幅代码中添加了以下CSS代码,使其始终显示在中心,

.className {
    max-width: 100%;
    max-height: 100%;
    bottom: 0;
    left: 0;
    margin: auto;
    overflow: auto;
    position: fixed;
    right: 0;
    top: 0;
}

This will position the ad at center, This Fixed my issue for now, I'll look in the SDK where webview is Created and try to display whatever content we get at the center . 这会将广告定位在中心位置。这就解决了我现在的问题,我将查看创建webview的SDK,并尝试显示我们在中心获得的任何内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM