public SuggestionsFilter(FilterableAdapter adapter)
     : base()
 {
     _adapter = adapter;
 }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Main);

            _button = FindViewById<Button> (Resource.Id.dosearch);
            _listview = FindViewById<ListView> (Resource.Id.list);
            _filterText = FindViewById<EditText> (Resource.Id.search);
            _adapter = new FilterableAdapter (this, Android.Resource.Layout.SimpleListItem1, GetItems());
            _listview.Adapter = _adapter;

            _button.Click += delegate {
                // filter the adapter here
                _adapter.Filter.InvokeFilter(_filterText.Text);
            };

            _filterText.TextChanged += (object sender, Android.Text.TextChangedEventArgs e) => {
                // filter on text changed
                var searchTerm = _filterText.Text;
                if (String.IsNullOrEmpty(searchTerm)) {
                    _adapter.ResetSearch();
                } else {
                    _adapter.Filter.InvokeFilter(searchTerm);
                }
            };
        }