Android Question Screen resolution differs with admob

Discussion in 'Android Questions' started by deyan666, Jul 26, 2015.

  1. deyan666

    deyan666 Member Licensed User

    I hope the title can make sense. Basically I have an app released and on Samsung there screen setup is perfect with admob but I find with HTC the screen doesn't fill like it's suppose to. I find the admob banner at the bottom covers the interface and the interface is lower than it should be. Any idea how to fix this issue? Current setup:


    Code:
    Private heightad As Int
         adbox.Initialize2(
    "Ad""ca-app-pub-85089637014xxxxxxxxxxxxx5913" , adbox.SIZE_SMART_BANNER )
        
    If GetDeviceLayoutValues.ApproximateScreenSize < 6 Then
          
    If 100%x > 100%y Then heightad = 32dip Else heightad = 50dip
        
    Else
        heightad = 
    90dip
        
    End If
        
    Activity.AddView(adbox, 0dip100%y - heightad, 100%x, heightad)
        adbox.LoadAd
        adbox.BringToFront
    Should I just add "dip" at the end of all common properties for the different Views?
     
    Last edited: Jul 26, 2015
  2. Erel

    Erel Administrator Staff Member Licensed User

    Please use [code]code here...[/code] tags when posting code.

    You should make sure that your layout leaves enough space for the ad. It will not happen automatically.
     
    deyan666 likes this.
  3. deyan666

    deyan666 Member Licensed User

    On my phone the layout has space for the ad. Although on some other devices such as HTC one it doesn't
     
Loading...