I have an application which at the beginning displays a login window. After checking the credentials I want to delete the current layer and load another layer.
In the second layer I want to display a menu. The problem is that the 3 dots of the menu are visible only after rotating the screen. Used code:
Where am I wrong?
In the second layer I want to display a menu. The problem is that the 3 dots of the menu are visible only after rotating the screen. Used code:
B4X:
Sub Activity_Resume
If isAutentic = True Then
Activity.LoadLayout("MainLayout")
Activity.AddMenuItem("Grafice", "ShowGrafice")
Activity.AddMenuItem("Valori", "TabelValori")
Else
Activity.RemoveAllViews
Activity.LoadLayout("LoginLayout")
End If
End Sub
Sub ButtonLogin_Click
Dim un As String = ""
Dim psw As String = ""
un = EditUsername.Text.Trim
psw = EditParola.Text.Trim
CheckLogin(un, psw)
End Sub
Sub CheckLogin(un As String, psw As String)
..........
if condition then
isAutentic = true
Activity.RemoveAllViews
Activity.LoadLayout("MainLayout")
Activity.AddMenuItem("Grafice", "ShowGrafice")
Activity.AddMenuItem("Valori", "TabelValori")
end if
End sub