vendredi 16 octobre 2015

Search android phone contacts cursor adapter + cyrillic sensetive

Hello i want to make my android RecyclerView Cursor adapter non sensitive using cyrillic. Everything is ok but no reaction at all when i am printing any of cyrillic symbols. My Sql request is next :

@Override
            protected FilterResults performFiltering(CharSequence constraint) {
                FilterResults results = new FilterResults();
                String value = constraint.toString().toLowerCase();
                String selection = "LOWER("+ContactsContract.Contacts.DISPLAY_NAME+") LIKE '" + value + "%' ";
                Cursor cursor = app().getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, selection, null, SqlCursorLoader.DATE_SORT_ORDER_ASC);
                results.values = cursor;
                return results;
            }

Aucun commentaire:

Enregistrer un commentaire