You are initializing Timer1 every time. You already get suggested to use it only when firsttime is true.
It does not help if you just IGNORE the suggestion.
Now
B4X:
timer1.Initialize("timer1", 1000)
Change it to
B4X:
If FirstTime Then
timer1.Initialize("timer1", 1000)
End If
Sub CalculateMonth
If monthTodayString = 1 Then
monthString="Gennaio"
else if monthTodayString = 2 Then
monthString="Febbrai"
else if monthTodayString = 3 Then
monthString="Marzo"
else if monthTodayString = 4 Then
monthString="Aprile"
else if monthTodayString = 5 Then
monthString="Maggio"
else if monthTodayString = 6 Then
monthString="Giugno"
else if monthTodayString = 7 Then
monthString="Luglio"
else if monthTodayString = 8 Then
monthString="Agosto"
else if monthTodayString = 9 Then
monthString="Settembre"
else if monthTodayString = 10 Then
monthString="Ottobre"
else if monthTodayString = 11 Then
monthString="Novembre"
else if monthTodayString = 12 Then
monthString="Dicembre"
End If
End Sub
Equivalent to:
B4X:
Sub CalculateMonth
Dim months() As String = Array As String("Gennaio", "Febbrai", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", _
"Settembre", "Ottobre", "Novembre", "Dicembre")
monthString = months(monthTodayString - 1)
End Sub
Ok Erel thanks. I need to re-open the interstitial on activity_resume, but the open is in loop... how to open ONLY when I close another Activity and re-open Main activity?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.