Android Question RadioButton not showing checked

JonRubin

Member
Licensed User
I must be missing something really simple, however after the code sets MTypeRadio.Checked = True, the button is not shown as selected even though I watch it in debug. Any ideas? Thank you in advance! -Jon



If FirstTime Then
Activity.LoadLayout("UserInfo")

Activity.AddMenuItem("Scan","Scan")
Activity.AddMenuItem("User Information","UI")

DeviceID.Text = P.GetSettings("android_id")
UserNameFld.Text = Main.UserName

MTypeRadio.Initialize("MTypeRadio")
DTypeRadio.Initialize("DTypeRadio")
BothTypeRadio.Initialize("BothTypeRadio")

If Main.UserID > -1 Then
If Main.UserType = "M" Then
MTypeRadio.Checked = True
Else If Main.UserType = "D" Then
DTypeRadio.Checked = True
Else If Main.UserType = "B" Then
BothTypeRadio.Checked = True
End If
SaveBtn.Text = "Update"
Else
SaveBtn.Text = "Insert"
End If
End If
 

derez

Expert
Licensed User
Setting the check is written after two If statement. Are they letting it be done ?
When copying code to the post, please use "insert" "code" - it is much easier to read.
 
Upvote 0

JonRubin

Member
Licensed User
Thank you Klaus... Removed the initialization and it now works! Thank you again!
and thank you derez for the heads up on the Insert Code.
-Jon
 
Upvote 0
Top