Problem using FilterDescriptor with StickyHeaderBehavior

5 posts, 0 answers
  1. Eric
    Eric avatar
    16 posts
    Member since:
    May 2014

    Posted 14 Oct 2015 Link to this post

    Hi,

    I've setup my ListView the following way:

    _contactsList = FindViewById<RadListView>(Resource.Id.ContactList);
     
    _stickyHeaderBehavior = new StickyHeaderBehavior();
    _contactsList.AddBehavior(_stickyHeaderBehavior);
     
    _contactListViewDataSourceAdapter = new ContactListViewDataSourceAdapter();
    _contactListViewDataSourceAdapter.ContactPersonCollectionSet += ContactPersonCollectionSet;
     
    _contactsGroupDescriptor = new ContactsGroupDescriptor();
    _contactListViewDataSourceAdapter.AddGroupDescriptor(_contactsGroupDescriptor);
     
    _contactItemFilterDescriptor = new ContactItemFilterDescriptor();
    _contactListViewDataSourceAdapter.AddFilterDescriptor(_contactItemFilterDescriptor);
     
    _contactsList.SetAdapter(_contactListViewDataSourceAdapter);

    And the filter applied as follows:

    public class ContactItemFilterDescriptor : Java.Lang.Object, IFunction
    {
        public Java.Lang.Object Apply(Java.Lang.Object item)
        {
            var contactPerson = item.Cast<ContactPerson>();
            return contactPerson.VisibleSearchResult;
        }
    }

    Strange behaviour 1 

    Image "1 initial load" shows the list when it is first loaded. This works nice. Important, don't scroll yet.

    Image "2 search-before-enter" shows the SearchView before hitting the search button.

    Image "3 after search command" shows the filtered result, but the HeaderView is still showing "B". 

    This happens when you directly start filtering the results, without scrolling. If you first scroll a bit up and down, and then apply ​a Search filter, it works nice as shown in Image "4 after scroll and after search command"

    Strange behaviour 2

    Image "5 after scroll and before search" shows the filtered result after a bit of scrolling, and before hitting search. After hitting search it filters nice, like step #4 before.

    Image "6 after clear search filter" shows the result when clearing the searchfilter. It keeps the filtered-header sticking to the top. After scrolling the view it corrects/redraws itself.

     

    Should I manually trigger some kind of ReDraw() or ReLoad() method on the DataSourceAdapter?

     

    Many thanks in advance!

  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 19 Oct 2015 Link to this post

    Hello Eric,

    Thank you for writing.

    I have to confirm that you both of these behaviors are unexpected and not desired. We are going to provide a fix which will be included in our next update later this week.

    I have updated your Telerik points for your cooperation and for your detailed step-by-step instructions.

    Regards,
    Todor
    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
  3. DevCraft banner
  4. Eric
    Eric avatar
    16 posts
    Member since:
    May 2014

    Posted 12 Nov 2015 in reply to Todor Link to this post

    Hi Todor,

    I'm using Telerik.Xamarin.Android.* version 2015.3.1028.0 and I still have this issue. Should it be fixed in this version? Or should I wait a bit longer for another version.

    Many thanks in advance,
    Eric

  5. Todor
    Admin
    Todor avatar
    778 posts

    Posted 17 Nov 2015 Link to this post

    Hello Eric,

    Thank you for writing back.

    Unfortunately the fix was not included in the version that you have and you will have to wait for the next update - which is scheduled for next week.

    Apologies for the caused inconvenience.

    Regards,
    Todor
    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
  6. Todor
    Admin
    Todor avatar
    778 posts

    Posted 27 Nov 2015 Link to this post

    Hello Eric,

    Just wanted to let you know that the new version is uploaded and the fix for the reported issue is included. You can download the latest version and give it a try.

    Regards,
    Todor
    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
Back to Top
DevCraft banner