Drago Bratko Active Member Licensed User Longtime User Jan 30, 2018 #1 I'm using multiple CustomListView's on the activity. Would like to address them dynamicaly and insert items on them. But I can't found a way to do it. Code: Copy For Each v As View In Activity.GetAllViewsRecursive If IsNumber(v.Tag) Then Dim clv As CustomListView = v clv.Add(CreateItem(v, DateTime.GetDayOfMonth(dDateToShow), "12", 0, "", True, bBlack), "") I need Tag property of a object, as with it I know what to do with it. On line "Dim clv as ...", compiler brakes with error : Dim clv As CustomListView = v javac 1.8.0_152 src\b4a\example\taskslist_mjesecno.java:586: error: incompatible types: View cannot be converted to customlistview _clv = (b4a.example.customlistview)(_v.getObject()); Click to expand... Any idea how to handle that ?
I'm using multiple CustomListView's on the activity. Would like to address them dynamicaly and insert items on them. But I can't found a way to do it. Code: Copy For Each v As View In Activity.GetAllViewsRecursive If IsNumber(v.Tag) Then Dim clv As CustomListView = v clv.Add(CreateItem(v, DateTime.GetDayOfMonth(dDateToShow), "12", 0, "", True, bBlack), "") I need Tag property of a object, as with it I know what to do with it. On line "Dim clv as ...", compiler brakes with error : Dim clv As CustomListView = v javac 1.8.0_152 src\b4a\example\taskslist_mjesecno.java:586: error: incompatible types: View cannot be converted to customlistview _clv = (b4a.example.customlistview)(_v.getObject()); Click to expand... Any idea how to handle that ?
Erel B4X founder Staff member Licensed User Longtime User Jan 31, 2018 #2 CustomListView is no a view. Add all of the CLVs to a List and iterate over this list instead. Upvote 0
Drago Bratko Active Member Licensed User Longtime User Feb 5, 2018 #3 Thank you ... will try to handle it in that way. Upvote 0