Dear Members,
Please help I am switching from a LogIn screen(Main Activity) to a 2nd activity having a lot of panels,layout and images.
As soon as I call the CallSubDelayed Method fter successful Login details there is a delay and a blank screen appears, after a delay of about 4-5 seconds the 2nd activity is created and the respective screen appears.
Please find the code below and screenshots of the same.
Also I tried using StartActivity too but this also gives the same problem.
The code for another activity-Automation
Let me know if you need more information on the same.
Thanks & Regards.
Please help I am switching from a LogIn screen(Main Activity) to a 2nd activity having a lot of panels,layout and images.
As soon as I call the CallSubDelayed Method fter successful Login details there is a delay and a blank screen appears, after a delay of about 4-5 seconds the 2nd activity is created and the respective screen appears.
Please find the code below and screenshots of the same.
B4X:
If enteredPassword = masterPassword Then
Log("login successful")
Msgbox("Login Successful", "HURRAY!!!")
resetAllPassword
CallSubDelayed(Automation, "Activity_Create")
' StartActivity(Automation)
Else
Log("Wrong password!!")
Msgbox("Wrong Password!! Please enter again!", "OOPSS!!")
Also I tried using StartActivity too but this also gives the same problem.
The code for another activity-Automation
B4X:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Room_Change")
Activity.LoadLayout("Main")
Socket1.Initialize("Socket1")
Socket1.Connect("192.168.1.125",8081,2000)
pnlHome.LoadLayout("Home")
pnlLighting.LoadLayout("Lighting")
pnlTempControl.LoadLayout("Temperature_Control")
pnlEntertainment.LoadLayout("Entertainment")
pnlTelevision.LoadLayout("Television")
pnlSTB.LoadLayout("STB")
pnlSecurity.LoadLayout("Security")
pnlDVD.LoadLayout("DVD")
pnlChnlList.LoadLayout("chnllist")
pnlSurveillance.LoadLayout("Surveillance")
pnlSecurity_Control.LoadLayout("Security_Control")
pnlProjector.LoadLayout("Projector")
pnlChnlList.LoadLayout("ChnlList")
pnlEngEnt.LoadLayout("EngEnt")
pnlEngNews.LoadLayout("EngNews")
pnlEngMovies.LoadLayout("EngMovies")
pnlHinEnt.LoadLayout("HinEnt")
pnlHinNews.LoadLayout("HinNews")
pnlHinMovies.LoadLayout("HinMovies")
pnlHD.LoadLayout("HD")
pnlDoordarshan.LoadLayout("Doordarshan")
pnlKannada.LoadLayout("Kanada")
pnlKids.LoadLayout("Kids")
pnlKnowledge.LoadLayout("Knowledge")
pnlMalayalam.LoadLayout("Malyalam")
pnlMarathi.LoadLayout("Marathi")
pnlMusic.LoadLayout("Music")
pnlActive.LoadLayout("Active")
pnlPunjabi.LoadLayout("Punjabi")
pnlOryBen.LoadLayout("OryBen")
pnlSports.LoadLayout("Sports")
pnlTamil.LoadLayout("Tamil")
pnlTelugu.LoadLayout("Telugu")
pnlMain.Visible=True
ImageView2.Visible=True
pnlHome.Visible=False
pnlLighting.Visible=False
pnlTempControl.Visible=False
pnlSTB.Visible=False
pnlEntertainment.Visible=False
pnlTelevision.Visible=False
pnlSecurity.Visible=False
pnlDVD.Visible=False
pnlChnlList.Visible=False
pnlSurveillance.Visible=False
pnlSecurity_Control.Visible=False
pnlProjector.Visible=False
pnlChnlList.Visible = False
pnlEngEnt.Visible = False
pnlEngNews.Visible = False
pnlEngMovies.Visible = False
pnlHinEnt.Visible = False
pnlHinNews.Visible = False
pnlHinMovies.Visible = False
pnlDoordarshan.Visible = False
pnlKannada.Visible = False
pnlKids.Visible = False
pnlKnowledge.Visible = False
pnlHD.Visible = False
pnlMalayalam.Visible = False
pnlMarathi.Visible = False
pnlMusic.Visible = False
pnlActive.Visible = False
pnlPunjabi.Visible = False
pnlOryBen.Visible = False
pnlSports.Visible = False
pnlTamil.Visible = False
pnlTelugu.Visible = False
End Sub
Let me know if you need more information on the same.
Thanks & Regards.