Peter Simpson, thanks for attention,
With your solution i made two routines that solve and it´s down (I hope it is useful and there is nothing native alternative).
I still want to learn how to use XcustomListView as Erel said, i´m begginer in B4A.
B4X:
Sub ChangeItem (LST As ListView, Item As Int, NewValue As String)
Dim CountItem As Int
Dim LSTTemp As ListView
LSTTemp.Initialize ("")
For CountItem=0 To LST.Size-1
If CountItem <> Item Then
LSTTemp.AddSingleLine (LST.GetItem(CountItem))
Else
LSTTemp.AddSingleLine (NewValue)
End If
Next
LST.Clear
For CountItem=0 To LSTTemp.Size-1
LST.AddSingleLine (LSTTemp.GetItem(CountItem))
Next
End Sub
Sub UPItem (LST As ListView, Item As Int, DownItem As Boolean)
Dim CountItem As Int
Dim LSTTemp As ListView
LSTTemp.Initialize ("")
If DownItem=False And Item > 0 Or DownItem=True And Item < LST.Size Then
For CountItem = 0 To LST.Size-1
If CountItem <> Item Then
If DownItem=False Or DownItem=True And CountItem <> Item+1 Then
LSTTemp.AddSingleLine (LST.GetItem(CountItem))
End If
Else
If DownItem=False Then
LSTTemp.RemoveAt(CountItem-1)
LSTTemp.AddSingleLine (LST.GetItem(CountItem))
LSTTemp.AddSingleLine (LST.GetItem(CountItem-1))
Else
LSTTemp.AddSingleLine (LST.GetItem(CountItem+1))
LSTTemp.AddSingleLine (LST.GetItem(CountItem))
End If
End If
Next
LST.Clear
For CountItem=0 To LSTTemp.Size-1
LST.AddSingleLine (LSTTemp.GetItem(CountItem))
Next
End If
End Sub
to use:
B4X:
ChangeItem(ListView3,2, "Tokyo") 'Item 2 of listview3 change to "Tokyo"
UPItem (ListView5, 4,True) 'Item 4 of listview5 up to previous line
UPItem (ListView7,8,False) 'Item 8 of listview7 down to next line