Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

ListView firing ItemAppearing always on iOS

$
0
0

Hello everyone,

i got a problem using the ListView event ItemAppearing, the problem is on IOS for each cell that the ListView loads the ListView fire the event itemAppearing instead of only when the cell appears on the screen like rolling... on Android i have no problem...

i want to make an infinite scroll to load itens as the user need.

tutorial base link: codenutz.com/lac09-xamarin-forms-infinite-scrolling-listview/

the code:

        private async void listViewProduto_ItemAppearing(object sender, ItemVisibilityEventArgs e)
        {
            try
            {
                if (itens != null && (e.Item as Item) == itens[itens.Count -4])
                {
                    AlertUtils.ShowLoading("Carregando...");

                    limiteConsulta += 30;
                    await threadLoadingItems();
                    carregaListView();
                    AlertUtils.HideLoading();
                }
            }
            catch (Exception ex)
            {
                UseAlertError(ex);
            }
        }

as can you see when is 4 itens to finish the list i will load more, but the itemAppearing is firing always

Regards


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>