I use ListView with SingleLine items, and I want modify text for selected item
Problem - item contains old value of text, but by another long click I see, what InputDialog gets the text with new value from item... How I can update item text?
Problem - item contains old value of text, but by another long click I see, what InputDialog gets the text with new value from item... How I can update item text?
B4X:
Type ListViewData (Text As String) ' "dimed" in Sub Globals
Sub lvNames_ItemLongClick (Position As Int, Value As Object)
Dim TD As InputDialog
Dim lvd As ListViewData
lvd = Value
TD.Input = lvd.Text
If TD.Show("Edit text", "", "OK", "Cancel", "", Null) = DialogResponse.POSITIVE Then
lvd.Text = TD.Input
lvNames.Invalidate
End If
End Sub