S straybullet Member Licensed User Longtime User Dec 6, 2011 #1 Is there an easy way to have admob at the book of the screen (perhaps centered). I have it running , but the ad is using the tutorial settings and is at the top. I would like to have it at the bottom, even when the screen is rotated, place it at the bottom Any help will be greatly appreciated.
Is there an easy way to have admob at the book of the screen (perhaps centered). I have it running , but the ad is using the tutorial settings and is at the top. I would like to have it at the bottom, even when the screen is rotated, place it at the bottom Any help will be greatly appreciated.
NJDude Expert Licensed User Longtime User Dec 6, 2011 #2 Assuming the Ad is on the Activity: Code: Copy Activity.AddView(myAdMob, 0dip, Activity.Height - 50dip, 320dip, 50dip) That will place the Ad at the bottom regardless of orientation. Last edited: Dec 6, 2011 Upvote 0
Assuming the Ad is on the Activity: Code: Copy Activity.AddView(myAdMob, 0dip, Activity.Height - 50dip, 320dip, 50dip) That will place the Ad at the bottom regardless of orientation.
S straybullet Member Licensed User Longtime User Dec 6, 2011 #3 Thanks, I figured out how to do it a little different, but both seem to work. Now to get it centered. Here is what I used... Activity.AddView(AdView1, 0dip, 100%y-50, 320dip, 50dip) I tried using Dim adplace as int Dim layoutVal As LayoutValues adplace = layoutval.Width /2 -60 get figure out the center values but never would work Upvote 0
Thanks, I figured out how to do it a little different, but both seem to work. Now to get it centered. Here is what I used... Activity.AddView(AdView1, 0dip, 100%y-50, 320dip, 50dip) I tried using Dim adplace as int Dim layoutVal As LayoutValues adplace = layoutval.Width /2 -60 get figure out the center values but never would work
NJDude Expert Licensed User Longtime User Dec 6, 2011 #4 To center it horizontally: Code: Copy Activity.AddView(myAdMob, (Activity.Width - 320dip) / 2, Activity.Height - 50dip, 320dip, 50dip) Upvote 0
To center it horizontally: Code: Copy Activity.AddView(myAdMob, (Activity.Width - 320dip) / 2, Activity.Height - 50dip, 320dip, 50dip)
S straybullet Member Licensed User Longtime User Dec 6, 2011 #5 Thanks I'll test it out on a few devices and screen sizes to see it in action. :sign0098: Upvote 0