protected override void PublishResults(ICharSequence constraint, Filter.FilterResults results)
    {
        using (var values = results.Values)
            _adapter.marking = values.ToArray <Object>()
                               .Select(r => r.ToNetObject <MarkingListModel>()).ToList();

        _adapter.NotifyDataSetChanged();
    }
    protected override void PublishResults(Java.Lang.ICharSequence constraint, Filter.FilterResults results)
    {
        using (var values = results.Values)
            _adapter.Mitems = values.ToArray <Object>()
                              .Select(r => r.ToNetObject <TaskOutboxModel>()).ToList();

        _adapter.NotifyDataSetChanged();
    }
Exemple #3
0
 protected override void PublishResults(ICharSequence constraint, Filter.FilterResults results)
 {
     _adapter.MatchItems = ((JavaWrapper <string[]>)results.Values).Wrapped;
     if (results.Count == 0)
     {
         _adapter.NotifyDataSetInvalidated();
     }
     else
     {
         _adapter.NotifyDataSetChanged();
     }
 }
Exemple #4
0
 protected override void PublishResults(Java.Lang.ICharSequence constraint, Filter.FilterResults results)
 {
     if (results.Count == 0)
     {
         this.SAdapter.NotifyDataSetInvalidated();
     }
     else
     {
         SAdapter.OriginalItems = searchList.ToArray();
         SAdapter.NotifyDataSetChanged();
     }
 }
Exemple #5
0
 protected override void PublishResults(Java.Lang.ICharSequence constraint, Filter.FilterResults results)
 {
     if (results.Count == 0)
     {
         this.SAdapter.NotifyDataSetInvalidated();
     }
     else
     {
         SAdapter.firstNames = (string[])results.Values;
         SAdapter.NotifyDataSetChanged();
     }
 }
        protected override FilterResults PerformFiltering(Java.Lang.ICharSequence constraint)
        {
            var results = new Filter.FilterResults();

            // Skip the autocomplete query if no constraints are given.
            if (constraint != null)
            {
                // Query the autocomplete API for the (constraint) search string.
                Adapter.resultList = getAutocomplete(constraint).Result.ToList();
                if (Adapter.resultList != null)
                {
                    // The API successfully returned results.
                    results.Values = new Java.Util.ArrayList(Adapter.resultList);
                    results.Count  = Adapter.resultList.Count;
                }
            }
            return(results);
        }
Exemple #7
0
        protected override void PublishResults(Java.Lang.ICharSequence constraint, Filter.FilterResults results)
        {
            var getThem = results.Values as JavaList <CustomerSingle>;

            // Clone items so they are local.
            var localItems = new JavaList <CustomerSingle>();

            foreach (var item in getThem)
            {
                localItems.Add(item);
            }

            adapter.NotifyDataSetChanged();
            adapter.Clear();
            foreach (var item in localItems)
            {
                adapter.Add(item);
            }
        }
 protected override void PublishResults(Java.Lang.ICharSequence constraint, Filter.FilterResults results)
 {
     a.NotifyDataSetChanged();
 }
 protected override void PublishResults(Java.Lang.ICharSequence constraint, Filter.FilterResults results)
 {
     _adapter.SetFilter(results.Values.ToArray <string>());
 }
            protected override void PublishResults(Java.Lang.ICharSequence constraint, Filter.FilterResults results)
            {
                if (results.Count == 0)
                {
                    return;
                }

                var list = results.Values.ToArray <Java.Lang.Object>();

                if (list != null && list.Length > 0)
                {
                    adapter.Clear();
                    foreach (var t in list)
                    {
                        adapter.Add(t);
                    }
                }
                if (results.Count > 0)
                {
                    adapter.NotifyDataSetChanged();
                }
                else
                {
                    adapter.NotifyDataSetInvalidated();
                }

                constraint.Dispose();

                results.Dispose();
            }