Hi, Need little help. I'm using a preference dialog which loads Json structure for input data and have little problem with displaying choice options. Is possible to define the position of the chosen option; now is the right aligned. Can I define the left, center, right alignment of choice item?
'p is the B4XPreferencesDialog
Dim rs As Object = p.ShowDialog(Data(0), "Ok", "CANCEL")
For i = 0 To p.PrefItems.Size - 1
Dim pi As B4XPrefItem = p.PrefItems.Get(i)
If pi.ItemType = p.TYPE_OPTIONS Then
Dim lbl As B4XView = p.CustomListView1.GetPanel(i).GetView(1)
lbl.SetLayoutAnimated(0, lbl.Parent.Width - 300dip, lbl.Top, 290dip, lbl.Top)
lbl.SetTextAlignment("CENTER", "CENTER")
End If
Next
Wait For (rs) Complete (Result As Int)
'p is the B4XPreferencesDialog
Dim rs As Object = p.ShowDialog(Data(0), "Ok", "CANCEL")
For i = 0 To p.PrefItems.Size - 1
Dim pi As B4XPrefItem = p.PrefItems.Get(i)
If pi.ItemType = p.TYPE_OPTIONS Then
Dim lbl As B4XView = p.CustomListView1.GetPanel(i).GetView(1)
lbl.SetLayoutAnimated(0, lbl.Parent.Width - 300dip, lbl.Top, 290dip, lbl.Top)
lbl.SetTextAlignment("CENTER", "CENTER")
End If
Next
Wait For (rs) Complete (Result As Int)
'p is the B4XPreferencesDialog
Dim rs As Object = p.ShowDialog(Data(0), "Ok", "CANCEL")
For i = 0 To p.PrefItems.Size - 1
Dim pi As B4XPrefItem = p.PrefItems.Get(i)
If pi.ItemType = p.TYPE_OPTIONS Then
Dim lbl As B4XView = p.CustomListView1.GetPanel(i).GetView(1)
lbl.SetLayoutAnimated(0, lbl.Parent.Width - 300dip, lbl.Top, 290dip, lbl.Top)
lbl.SetTextAlignment("CENTER", "CENTER")
End If
Next
Wait For (rs) Complete (Result As Int)