load the entire ListView in background and get an UIControl inside each ListItem

前端 未结 1 1216
Happy的楠姐
Happy的楠姐 2021-01-28 22:12

I need to load a ListView entirely and get an UIControl inside each ListItem even if the item view is not displayed on the screen.

I tried the ChildViewAdded event, but

1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-28 22:31

    Quick answer - if you need a real View for each item in your list then you don't want to use a virtualized control like a ListView.

    Instead you can use repeated custom views inside a vertical LinearLayout inside a ScrollView.

    If using mvvmcross, you may find a MVXBindableLinearLayout helpful to do this - it has an ItemsSource and a Template just like the MvxBindableListView.


    I've no idea whether what you are trying to do makes sense, but the above should help you do it if you want to!

    Don't try using a linear layout for lists with lots of items - you'll run out of resources.

    0 讨论(0)
提交回复
热议问题