Hi,
Good day everyone.
Still understanding how CLVSwipe works, now I'm stuck how to get the stored value return by CLVSwipe.
Please see sample code
I tried to get the value using clv.GetValue(index) but i dont know what command to use to get the value on it.
this is the sample output of clv.GetValue(index) inside Swipe_ActionClicked:
[Actions=(ArrayList) [Cancel], IsInitialized=true, IsSwiped=false,MaxSwipe=205, Open=false, Value=[IsInitialized=false, orderid=34]]
As the result of clv.GetValue(index) i can see the value of orderid=34 which is correct, but how to assign it and get it as variable using the Swipe_ActionClicked.
Thanks for helping.
Good day everyone.
Still understanding how CLVSwipe works, now I'm stuck how to get the stored value return by CLVSwipe.
Please see sample code
B4X:
Sub Swipe_ActionClicked (Index As Int, ActionText As String)
Log($"Action clicked: ${Index}, ${ActionText}"$)
'i want to get here the value of the map stored in Swipe.CreateItemValue value to assign them to variable
End Sub
Sub Daterecords
Dim m as map
Dim OrderHistVal as list
Dim parser As JSONParser
parser.Initialize(j.GetString)
OrderHistVal = parser.NextArray
For i = 1 To OrderHistVal.size - 1
m = OrderHistVal.Get((i)
order_id_val = m.Get("order_id")
cs.Initialize.Color(Colors.Blue).Append(order_id_val).PopAll
clv.AddTextItem(cs, Swipe.CreateItemValue(m, Array("Cancel")))
Next
End Sub
I tried to get the value using clv.GetValue(index) but i dont know what command to use to get the value on it.
this is the sample output of clv.GetValue(index) inside Swipe_ActionClicked:
[Actions=(ArrayList) [Cancel], IsInitialized=true, IsSwiped=false,MaxSwipe=205, Open=false, Value=[IsInitialized=false, orderid=34]]
As the result of clv.GetValue(index) i can see the value of orderid=34 which is correct, but how to assign it and get it as variable using the Swipe_ActionClicked.
Thanks for helping.
Last edited: