criiAguirre
New Member
Hello there.
I need help, I am trying to charge a second Activity from the main activity, but I don´t know Why it is sending ERROR.
Check it out, and help me please!! :'3
This is the codification's Main Activity
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////7
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////7
This is the codification's Second Activity
I need help, I am trying to charge a second Activity from the main activity, but I don´t know Why it is sending ERROR.
Check it out, and help me please!! :'3
This is the codification's Main Activity
B4X:
Sub Process_Globals
Dim tiempo As Timer 'Variable que nos permitirá trabajar con el método initialize con el fin de mostrar una
'interfaz de bienvenida
End Sub
Sub Globals
Private Estudiantes As Button 'Estas variables a los objetos creados en el Diseñador
End Sub
Sub Activity_Create(FirstTime As Boolean)
tiempo.Initialize("tiempo", 2000) 'El metodo Initialize recibe dos campos el nombre el nombre de la variable que creamor & la cantidad numérica donde 1000 = 1seg
tiempo.Enabled = True 'Los procesos almacenados en la variable "tiempo" serán ejecutadas
Activity.LoadLayout("welcome") 'Cargar la interfaz llamada "welcome"
End Sub
Sub tiempo_Tick
Activity.RemoveAllViews 'creamos el método Tick y llamamos el Layout que queramos
Activity.LoadLayout("main") 'Ojo debe cambiarse la opción Encabled a False
tiempo.Enabled = False
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Estudiantes_Click
StartActivity(Students) 'Carga el Activity "Students"
End Sub
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////7
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////7
This is the codification's Second Activity
B4X:
Sub Globals
Private IconHome As Bitmap 'Estas variables servirán para cargar iconos en nuestro TabHost
Private IconComputers As Bitmap
Private IconReports As Bitmap
Private TabHost1 As TabHost
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("est_main")
IconHome = LoadBitmap(File.DirAssets, "home.png") 'Asignamos a las variables el archivo png de nuestro ícono
IconComputers = LoadBitmap(File.DirAssets, "computers.png")
IconReports = LoadBitmap(File.DirAssets, "reports.png")
TabHost1.AddTabWithIcon("", IconHome, IconHome, "est_welcom.bal") 'Mostramos los íconos en el TabHost
TabHost1.AddTabWithIcon("", IconComputers, IconComputers, "est_labs.bal")
TabHost1.AddTabWithIcon("", IconReports, IconReports, "est_reports.bal")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub