Android Question Banners Ads works only with 100%x in width?

asales

Expert
Licensed User
Longtime User
I have this layout:
ulv2a.jpg

2 UltimateListViews: 1 to a list of profiles and 1 (right = 28dip) to a list of letters.

I want to put a banner inside the list of profiles.
I created a layout to the cell of profiles and a layout to the cell of banners.

If I use this code (with 100%x) the banner is shown correctly but cuts the right side (the button with arrow), like image:
B4X:
Dim pAd As Panel = LayoutPanel.GetView(0) 'First view in the panel
pAd.AddView(AdView1, 0, 0, 100%x, iheight)

If I change the width (100%x) to this options, to try show the width of banner correctly, the banner is not show:
- 97%x
- 100%x - 28dip
- pAd.Width

What could be happening?
How I can fix it?

Thanks in advance for any tip.
 

sorex

Expert
Licensed User
Longtime User
is it an admob banner?

then read the placement guidelines.

you need to have a minimum gap between the banner and the content.

they won't allow it to be on top of selectable content and you'll risk to get banned.
 
Upvote 0

asales

Expert
Licensed User
Longtime User
is it an admob banner?
Yes. It is a Admob banner.
I used the Native Express in other apps and works fine (I can adjust the size), but it don't works anymore in the FirebaseAdmob library, so I change it to banners.

then read the placement guidelines.
you need to have a minimum gap between the banner and the content.
they won't allow it to be on top of selectable content and you'll risk to get banned.
I saw the guidelines. This is the problem.
The height is OK, I can put more space between items, but how I can fix the width of the banner to adjust in panel of the UltimateListView.
Only 100%x in width works to the banner?
 
Upvote 0

asales

Expert
Licensed User
Longtime User
I found this answer to the size SIZE_SMART_BANNER:
These ads will fill the whole available width.
 
Upvote 0
Top