Hi There,
I keep getting this Error. I know I have not done something right but cant figure it out. My Intention is to get the field values from EditText and based on values purpose validation. I am using XmlLayoutBuilder for the first time.
I keep getting this Error. I know I have not done something right but cant figure it out. My Intention is to get the field values from EditText and based on values purpose validation. I am using XmlLayoutBuilder for the first time.
java.lang.RuntimeException: Object should first be initialized (EditText).
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim ButtonLogin As Button
Dim btnLinkToRegisterScreen As Button
Dim vdsLogo As ImageView
Dim vMobile As EditText
Dim vPassword As EditText
Dim First As String
Dim Second As String
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Dim x As XmlLayoutBuilder
x.LoadXmlLayout(Activity, "activity_login")
Dim tc As Int = 0xffffffff 'the format is AARRGGBB
Activity.Color = tc
vdsLogo = x.GetView("vdsLogo")
ButtonLogin = x.GetView("button1")
vMobile.Initialize("")
vMobile = x.GetView("txtmobile")
vPassword = x.GetView("txtpassword")
End Sub
Sub ButtonLogin_Click
First = vMobile.Text
Msgbox(vMobile.Text, "")
End Sub