may be there are other solutions which are smarter then this:
B4X:
Dim map1 As Map
Dim list1 As List
Dim mypanel As Panel
mypanel.Initialize("P")
list1.Initialize
map1.Initialize
map1.Put(1,"Hello World")
map1.put(2,mypanel)
list1.Add(0)
For Each v As Object In map1.Values
Log(v)
list1.Add(v)
Next
Log(list1.Size)