question

jtpdev avatar image
jtpdev asked

How to make an AdLayout appear only when the "Ad" is loaded

So I am trying out to figure what is the proper way between either XML layout and Java code to get an AdLayout to start showing the "ad" at the bottom of my screen only when the "ad" is fully loaded. So the idea is that I have a Main activity (RelativeLayout) with the top element in it being a ViewPager. The ViewPager when there is no "ad" take the full screen. My goad is when the Ad is loaded, I should show at the bottom of the screen the newly loaded "ad" and at the same time to avoid masking what was at the bottom of the ViewPager, the easiest is to update the bottom padding's ViewPager. I have try different things, and so far no luck... So anyone that could point me to the right direction it will be welcome. And for the curious one: I am doing that because I got report from Amazon dev testing team that my app is not fully HD optimized because when you launch the app -and thus when the app is still loading its data and loading the content for the "ad" there is a "black empty" area where the bottom ad should appear. I try to tell them that it is kind of excepted since the app is starting up and loading data from network but I prefer to have a workaround if they continue complaining.
mobile ads
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Please refer our "Floating Ad Sample" for this. https://developer.amazon.com/public/apis/earn/mobile-ads/docs/sample-apps#Floating%20Ad%20Sample We also ship the sample with Apps-SDK.zip
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.