This is a migrated thread and some comments may be shown as answers.

OnAppearing/OnDisappearing not called for ListViewTemplateCell

8 Answers 538 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Sascha
Top achievements
Rank 1
Sascha asked on 28 Jan 2017, 09:29 AM

Hello,

I derived my class from ListViewTemplateCell and tried to overwrite OnAppearing/OnDisappearing to be notified when an item is actually visible.

But those callbacks are never hit. I also tried the Appearing-EventHandler, but this is not called either.

Seems like a bug?

8 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 01 Feb 2017, 03:54 PM
Hi,

Could you please share with us your exact setup? How is your custom cell used and created? Is it visualized on the screen?

We are looking forward to hearing from you.

Regards,
Pavel R. Pavlov
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Sascha
Top achievements
Rank 1
answered on 01 Feb 2017, 06:43 PM

Hi Pavel,

 

thanks for getting back to me.

Well, i pushed an example on github: https://github.com/esskar/TelerikListViewPoc

It should demonstrate all problems i have with the list view on iOS. Please find the class BookListCell, it overwrite the OnAppearing/OnDisappearing functions, but they are never called.

 

Thanks.

Sascha

 

 

0
Pavel R. Pavlov
Telerik team
answered on 06 Feb 2017, 11:31 AM
Hello Sasha,

Thank you for providing us with repro project. Indeed the events are not triggered. This behavior is already logged in our backlog system. This means it will be reevaluated and fixed in our future releases. Till then users are able to be notified when a cell is visualized using a different mechanism.

Users are allowed to create custom DataSource. In iOS the DataSource is responsible for managing the cells. For example you can override the InitCell() method and get the index of the item being visualized.

You can take a look at the attached project to get a better knowledge.

I hope this information helps. Let us know if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Sascha
Top achievements
Rank 1
answered on 07 Feb 2017, 09:25 PM
This makes no sense, as i never get a notification when disappears.
0
Pavel R. Pavlov
Telerik team
answered on 13 Feb 2017, 07:11 AM
Hello Sascha,

Indeed, this approach will not notify you when the cell disappears. We have already logged an item in our backlog system to reiterate over the cells. We will definitely improve their implementation in our future releases.

Regards,
Pavel R. Pavlov
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Jared
Top achievements
Rank 1
answered on 20 May 2019, 03:50 PM

Back in February of 2017, it was mentioned that the implementation of this was definitely going to be improved. Has that happened? OnAppearing and OnDisappearing are still not called.

To echo Sascha's concerns, the project provided by Pavel gives a workaround for OnAppearing, but I do not see any workaround for OnDisappearing even though Pavel says there is. Maybe I am just missing something. If so, could I please get some clarification?

0
Pavel R. Pavlov
Telerik team
answered on 21 May 2019, 01:16 PM
Hello Jared,

Let me get straight to your question.

Since my last reply, we have not changed the behavior of the ListViewTemplateCell. The demand for this particular case did not receive any further attention and more pressing tasks took their place in our roadmap instead.

At this time, we are not sure about the future of the entire cell concept inside the XamarinForms components. The newest items control of XamarinForms, the CollectionView, does not take advantage of cells. This is why we cannot commit to fixing code that entirely relies on logic that might get obsolete in the near future. We prefer to first see the course of action of the XamarinForms platform regarding the cells and then commit to fixing existing code or writing new one.

As for the alternative for the OnDissapearing notification in the current version of the RadListView, there is none. I have made a typo in the earlier reply which misleads the reader. After posting this reply I will edit the older one to fix the mistake I made. Please accept my apology for making such a typo.

Regards,
Pavel R. Pavlov
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Jared
Top achievements
Rank 1
answered on 21 May 2019, 08:22 PM

Thank you for the timely response, Pavel!

While unfortunate, that does help our decision making process.

Tags
ListView
Asked by
Sascha
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Sascha
Top achievements
Rank 1
Jared
Top achievements
Rank 1
Share this question
or