I am using a splash screen, and app is setup for Full Screen portrait mode, when you play a video it opens in landscape full screen and when quit video the Activity restarts and this time it stays at splash screen.
I have tried to handle through pause sub, resume sub but no luck; Here is the code for your reference:
I have tried to handle through pause sub, resume sub but no luck; Here is the code for your reference:
B4X:
Sub Activity_Create(FirstTime As Boolean)
pnllist.Initialize
BayanCList.Initialize
If FirstTime Then
isFirst = True
End If
SplashTimer.Initialize("SplashTimer", 4000)
SplashTimer.Enabled = True
Activity.LoadLayout("spalsh")
End Sub
Sub Activity_Resume
If isFirst = False Then
Dim pnl As Panel = BayanList.GetPanel(posBayan-1)
If pnllist.Size > 0 Then
For i = 0 To pnllist.Size-1
Dim p As Panel = pnllist.Get(i)
p.Color = Colors.Transparent
Next
End If
pnl.Color = pnlBG
End If
End Sub
Sub Activity_Pause (UserClosed As Boolean)
If UserClosed = True Then
Activity.Finish
End If
posBayan = posBayan
isFirst = False
End Sub
Sub SplashTimer_Tick
SplashTimer.Enabled = False
DoEvents
Activity.RemoveAllViews
DoEvents
Activity.LoadLayout("Main")
End Sub