'Activity module
Sub Process_Globals
End Sub
Sub Globals
Dim cd As CustomDialog
Dim btn As Button
Dim txtUID As EditText
Dim txtPW As EditText
Dim chkRememberUID As CheckBox
Dim chkRememberPW As CheckBox
End Sub
Sub btn_Click
'Msgbox ("Button Click","")
'Show(Title As String, Positive As String, Cancel As String, Negative As String, icon As android.graphics.Bitmap) As Int
'cd.Show("Login:", "Ok", "Cancel", "", Null)
cd.Show("", "Login", "", "", Null)
'Msgbox( cd.Response,"")
If cd.Response = -1 Then 'OK
Msgbox ("You entered:" & CRLF & "User ID: " & txtUID.Text & CRLF & "Password: " & txtPW.Text & CRLF & "Rem User ID: " & chkRememberUID.Checked & CRLF & "Rem Password: " & chkRememberPW.Checked, "")
End If
'CustomDialog
'Response As Int [read only] -1 = OK -3 Cancel
'Returns the response code that the dialog returned when it last closed.
'Show (Title As String, Positive As String, Cancel As String, Negative As String, icon As android.graphics.Bitmap) As Int
'Shows a modal custom dialog with the specified title.
'Title - The dialog title.
'Positive - The text To show For the "positive" Button. Pass "" If you don't want to show the button.
'Cancel - The text To show For the "cancel" Button. Pass "" If you don't want to show the button.
'Negative - The text To show For the "negative" Button. Pass "" If you don't want to show the button.
'Icon - A Bitmap that will be drawn near the title. Pass Null If you don't want to show an icon.
'Returns one of the DialogResponse values.
End Sub
Sub Activity_Create(FirstTime As Boolean)
btn.Initialize("btn")
btn.Text = "Login"
Activity.AddView(btn,50,50,150,150)
Dim pnl1 As Panel
pnl1.Initialize ("")
cd.AddView(pnl1, 0, 30, 250dip, 150dip)
Dim lblUID As Label
lblUID.Initialize("")
lblUID.Text = "User ID: "
lblUID.TextSize = 18
pnl1.AddView(lblUID, 10dip, 5dip, 100dip, 40dip)
txtUID.Initialize("")
txtUID.Hint = "Enter User ID"
pnl1.AddView(txtUID, 85dip, 0, 165dip, 40dip)
Dim lblPW As Label
lblPW.Initialize("")
lblPW.Text = "Password: "
lblPW.TextSize = 18
pnl1.AddView(lblPW, 10dip, 50dip, 100dip, 40dip)
txtPW.Initialize("")
txtPW.Hint = "Enter Password"
txtPW.PasswordMode = True
pnl1.AddView(txtPW, 85dip, 45dip, 165dip, 40dip)
chkRememberUID.Initialize("")
chkRememberUID.Text = "Remember UID"
pnl1.AddView(chkRememberUID, 85dip, 85dip, 210dip, 40dip)
chkRememberPW.Initialize("")
chkRememberPW.Text = "Remember PW"
pnl1.AddView(chkRememberPW, 85dip, 120dip, 210dip, 40dip)
End Sub
Sub Activity_Resume
'btn_Click
End Sub