Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private ad As AdView
Private ads_panel As Panel
End Sub
Public Sub Initialize
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
ad.Initialize("ad", "ca-app-pub-3940256099942544/6300978111 ", Main.PagesManager.MainPage, ad.SIZE_BANNER)
Root.AddView(ad, ads_panel.Left,ads_panel.Top, 320dip, 50dip)
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Sub Button1_Click
xui.MsgboxAsync("Hello world!", "B4X")
End Sub
Sub Ad_AdScreenDismissed
End Sub
Sub Ad_FailedToReceiveAd (ErrorCode As String)
Log("Failed: " & ErrorCode)
End Sub
Sub Ad_PresentScreen
End Sub
Sub Ad_ReceiveAd
End Sub