Sub get_field_data As Map
LogColor("get_field_data",Colors.Yellow)
Dim m As Map
m.Initialize
For Each v As View In pnldata.GetAllViewsRecursive
Dim t As String
t=v.Tag
If t<>"" And t<>"null" And t<>"XUI" Then
Log("tag="&t)
LogColor(GetType(v),Colors.Red)
If v Is EditText Or v Is AutoCompleteEditText Then
Dim v2 As EditText
v2.Initialize("")
v2=v
Try
m.Put(t.SubString2(0,t.IndexOf(" ")),v2.Text)
Catch
End Try
End If
If v Is Spinner Then
Dim sp As Spinner
sp.Initialize("")
sp.Tag=t
sp=v
Try
m.Put(t.SubString2(0,t.IndexOf(" ")),sp.SelectedIndex)
Catch
End Try
End If
If v Is Button Then
Dim b As Button
b.Initialize("")
b=v
Try
m.Put(t.SubString2(0,t.IndexOf(" ")),b.Text)
Catch
End Try
End If
If v Is B4XComboBox Then
LogColor("Found B4xcombobox!",Colors.green)
Dim cb As B4XComboBox
cb=v
Try
m.Put(t.SubString2(0,t.IndexOf(" ")),cb.GetItem(cb.SelectedIndex))
Catch
End Try
End If
If v Is AnotherDatePicker Then
LogColor("Found AnotherDatePicker!",Colors.green)
Dim adp As AnotherDatePicker
adp=v
Try
m.Put(t.SubString2(0,t.IndexOf(" ")),adp.Date)
Catch
End Try
End If
End If
Next
Return m
End Sub