Filter ListView Android (C#)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Filter ListView Android (C#)

alin
Hi,
How To use this code in Monodroid(C#)?
OR
How To filter listview that is populate via SimpleCursorAdapter.

<pre><code>
adapter.setFilterQueryProvider(new FilterQueryProvider() {
        public Cursor runQuery(CharSequence constraint) {
            return getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
                    new String[] {Phone._ID, Phone.DISPLAY_NAME, Phone.NUMBER},
                    Phone.DISPLAY_NAME + " LIKE '" + constraint + "%'",
                    null, null);
        }
    });
</code>
</pre>
Loading...