I have this sub:
When the user does press the back button, exiting from the preferences screen, the activity is resumed, so the CToast (Custom Toast) does show, but the prefsScreen is not called again...
The idea is to prevent the user from returning to the Activity withou filling the preferences...
Whats Wrong?
B4X:
Sub Activity_Resume
If Main.PrefManager.GetString("Server") = "" Then
CToast.ShowBitmap("Introduza o servidor do Jogo !",750,Gravity.CENTER, 0, 0, LoadBitmap(File.DirAssets,"Warning.png"))
StartActivity(main.PrefScreen.CreateIntent)
Else If Main.PrefManager.GetString("UserName") ="" Then
CToast.ShowBitmap("Introduza o seu Username !",750,Gravity.CENTER, 0, 0, LoadBitmap(File.DirAssets,"Warning.png"))
StartActivity(main.PrefScreen.CreateIntent)
Else If Main.PrefManager.GetString("PassWord") = "" Then
CToast.ShowBitmap("Introduza a sua PassWord !",1500,Gravity.CENTER, 0, 0, LoadBitmap(File.DirAssets,"Warning.png"))
StartActivity(main.PrefScreen.CreateIntent)
End If
End Sub
When the user does press the back button, exiting from the preferences screen, the activity is resumed, so the CToast (Custom Toast) does show, but the prefsScreen is not called again...
The idea is to prevent the user from returning to the Activity withou filling the preferences...
Whats Wrong?