OnAppearing/OnDisappearing not called for ListViewTemplateCell

9 posts, 0 answers
  1. Sascha
    Sascha avatar
    13 posts
    Member since:
    Jan 2017

    Posted 28 Jan 2017 Link to this post

    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?

  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1251 posts

    Posted 01 Feb 2017 Link to this post

    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
  3. Sascha
    Sascha avatar
    13 posts
    Member since:
    Jan 2017

    Posted 01 Feb 2017 Link to this post

    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

     

     

  4. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1251 posts

    Posted 06 Feb 2017 Link to this post

    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
  5. Sascha
    Sascha avatar
    13 posts
    Member since:
    Jan 2017

    Posted 07 Feb 2017 in reply to Pavel R. Pavlov Link to this post

    This makes no sense, as i never get a notification when disappears.
  6. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1251 posts

    Posted 13 Feb 2017 Link to this post

    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
  7. Jared
    Jared avatar
    5 posts
    Member since:
    May 2019

    Posted 20 May 2019 Link to this post

    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?

  8. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1251 posts

    Posted 21 May 2019 Link to this post

    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
  9. Jared
    Jared avatar
    5 posts
    Member since:
    May 2019

    Posted 21 May 2019 in reply to Pavel R. Pavlov Link to this post

    Thank you for the timely response, Pavel!

    While unfortunate, that does help our decision making process.

Back to Top