Please test if AdMob is showing

TrisectDevelopment

Active Member
Licensed User
Longtime User
I have just updated my app "My Computer Companion" but I'm not sure that AdMob Ads is showing. I can't see them here in Denmark.

But maybe they only get showed in other countries!!

Could somebody check if the Adds is showing.
I'm not asking you to click on the adds, just confirm that the adds is showing.

I really would like to know, maybe I did something wrong.

P.S.
I have another thread about AdMob with same same question, but only one has checked and he could not see Adds.
 

dagnabitboy

Active Member
Licensed User
Longtime User
Just checked your app, My computer companion. I see the place for the AdMob to appear but it is blank. I'm in California. Also, perhaps your app is not finished yet, but the information screen shows up as white text on a light white background on my DroidX. It is not readable.

Phil
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I don't get any ads. I'm in Israel. AdMob does work here properly.

I also got an error about a missing file: dos20.txt.
I recommend you to make the TabHost size 100%x and height 100%y - 50dip (for the ad). This way it will resize to the whole screen. I've tested your application with a tablet (Samsung 10.1) and it only uses a small portion of the screen.
 
Upvote 0

TrisectDevelopment

Active Member
Licensed User
Longtime User
Erel:

If I use 100% on the Tabhost can I then use 100% on my listviews I have in my tabhost?

I found out why it was asking for dos20.txt and it wil be corrected in the next version.
 
Upvote 0

TrisectDevelopment

Active Member
Licensed User
Longtime User
So I just updated it.
But not with a version that would be displayed on tablet only phone.

There was something missing in the XML file, I hope AdMob is showed now.

To Erel: I would still like to know what to do with ListView when using 100%x, 100%y with TabHost?
 
Upvote 0

eps

Expert
Licensed User
Longtime User
Why not both? I've coded mine for small, medium and large screen resolutions.

I'll update it and see.

I've been quite interested in the statistics that the Market can chuck back at you! :)

I think the tips and tricks font is a little wrong... it's quite small on my phone.
 
Upvote 0

TrisectDevelopment

Active Member
Licensed User
Longtime User
Erel:

I tried that, but my ListViews are to heigh, you can not see the bottom of them.

I did set:
TabHost.Height = 100%x
TabHost.Width = 100%y - 50dip

ListView.Height = -1
ListView.Width = -1

I set both my ListView to that and my EditText to -1

Does it matter where in my code I set those values?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've just tried the following code and it works correctly.
B4X:
Sub Globals
    Dim TabHost1 As TabHost
    Dim ListView1 As ListView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    TabHost1.Initialize("TabHost1")
    ListView1.Initialize("ListView1")
    Dim p As Panel
    p.Initialize("")
    TabHost1.AddTab2("Tab 1", p)
    p.AddView(ListView1, 0, 0, -1, -1)
    ListView1.FastScrollEnabled = True
    Activity.AddView(TabHost1, 0, 0, 100%x, 100%y)
    For i = 1 To 4000
        ListView1.AddSingleLine(i)
    Next
End Sub
 
Upvote 0

TrisectDevelopment

Active Member
Licensed User
Longtime User
Your example also work fine when I try it in the emulator.
I have two emulators:
240x320 to emulate HTC Wildfire
480x800 to emulate HTC Desire S

But I designed mine with Designer. I did not create UI in the program.

Could it be possible for me to send my sorcecode to you to see if you get the same result as I?
 
Upvote 0

TrisectDevelopment

Active Member
Licensed User
Longtime User
B4X:
Sub Activity_Create(FirstTime As Boolean)

   Activity.LoadLayout("Splash")
   Activity.Title = "My Computer Companion"
   
   '** Find phone resulution
   Dim lv As LayoutValues
   lv = GetDeviceLayoutValues
   ScreenWidth = lv.Width
   ScreenHeight = lv.Height

   ResizeSystem
   
   ValgtSystem = 0
   ValgtTips = 0
   
   '** Initialize
   AdView1.Initialize("Ad", "xxxxxxxxxxxxxxx")
   Activity.AddView(AdView1, 0dip, 0dip, 320dip, 50dip)
   AdView1.LoadAd
End Sub

Sub ResizeSystem
 Activity.Width = ScreenWidth
 Activity.Height = ScreenHeight
 ivSplash.Width = ScreenWidth
 ivSplash.Height = ScreenHeight
 btnStartMCC.Left = (100%x / 2) - (btnStartMCC.Width / 2)
 btnStartMCC.Top = 100%y - btnStartMCC.Height - (ScreenHeight * 0.2)
End Sub

Sub FillSystem
   lvSystem.Height = -1
   lvSystem.Width = -1
   
   lvSystem.AddSingleLine("Windows XP")
   lvSystem.AddSingleLine("Windows Vista")
   lvSystem.AddSingleLine("Windows 7")
   lvSystem.AddSingleLine("MAC OS-X")
   lvSystem.AddSingleLine("Linux")
   lvSystem.AddSingleLine("DOS")
End Sub

Sub thMenu_TabChanged
   If thMenu.CurrentTab = 1 Then '** Tips & Tricks
      lvTips.SingleLineLayout.Label.TextSize = 10
      lvTips.Clear
      lvTips.Height = -1
      lvTips.Width = -1
              End If
   If thMenu.CurrentTab = 2 Then '** Information
      txtInformation.Height = -1
      txtInformation.Width = -1
              End If
End Sub

Sub btnStartMCC_Click
   Activity.RemoveViewAt(0)
   Activity.LoadLayout("FirstView")
   
   '** Resize screen
   thMenu.Width = 100%x
   thMenu.Height = 100%y-50dip
   
   'thMenu.Initialize("thMenu")
   thMenu.AddTab("System", "System")
   thMenu.AddTab("Tips & Tricks", "Tips")
   thMenu.AddTab("Information", "Information")
   
   '** Fill listview
   FillSystem
End Sub

Hope you can get something out of this!
 
Upvote 0

TrisectDevelopment

Active Member
Licensed User
Longtime User
Okay I tried it with my Wildfire Emulator settings 240 x 320

Screen.Height = 230
Screen.Width = 240

lvSystem.Height = -1
lvSystem.Width = -1

lvSystem.png

Here you can not see the last system (DOS)

lvTips.Height = -1
lvTips.Width = -1

lvTips.png

Here you can not see last item number 40 (is in list)

txtInformation.Height = -1
txtInformation.Width = -1

txtInformation.png

Here the EditTExt is to big.

Hope this can help you point out my problem.
 
Upvote 0

eps

Expert
Licensed User
Longtime User
Resize them? They've fallen off the bottom of your screen, but I'm sure you knew that already. I would make the OS items and text a little smaller and they should all fit. Then again the hints text needs to be a bit bigger, imho.
 
Upvote 0

TrisectDevelopment

Active Member
Licensed User
Longtime User
I did that at first.
Read the screen size and set the size according to that.
But Erel said it did not look good on a tab.

So I'm trying to make it suit every screen size.

But so far not with much luck.
 
Upvote 0
Top