Code example for Uri

Methods: equals

0
 
        @Override 
        protected void onPostExecute(Bitmap bitmap) {
            if (isCancelled())
                bitmap = null;
            if(imageView != null && uri.equals(imageView.getTag()) && bitmap != null)
                imageView.setImageBitmap(bitmap);
        } 
    } 
 
    @Override 
    public String convertToString(Cursor cursor) {
        if(cursor.getColumnIndex(Email.DATA) > -1) {
            int name = cursor.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME);
            int email = cursor.getColumnIndexOrThrow(Email.DATA);
            if(cursor.isNull(name))
                return cursor.getString(email);
            return cursor.getString(name) + " <" + cursor.getString(email) +">";
        } else { 
            int name = cursor.getColumnIndexOrThrow(TagData.NAME.name);
            return "#" + cursor.getString(name);