android.widget.ImageView#setTag ( )源码实例Demo

下面列出了android.widget.ImageView#setTag ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

public ImageView build(Context ctx) {
	String action = itemDesc.getAction();
	if (action == null || action.equals("")) {
		throw new IllegalArgumentException("No menu action specified!");
	}
	int iconDrawableID = itemDesc.getIcon();
	if (iconDrawableID <= 0) {
		throw new IllegalArgumentException("No menu icon specified!");
	}
	
	ImageView item = new ImageView(ctx);
	item.setTag(action);
	item.setImageResource(iconDrawableID);
	item.setContentDescription(ctx.getString(R.string.icon));
	int padding = DimenUtils.getPixelsFromDP(ctx.getResources(), MENU_ITEM_PADDING);
	item.setPadding(padding, padding, padding, padding);
	return item;
}
 
源代码2 项目: bither-android   文件: RawDataDiceView.java
public void removeAllData() {
    int size = data.size();
    data.clear();
    for (int i = 0;
         i < size;
         i++) {
        final ImageView iv = (ImageView) ((FrameLayout) getChildAt(i)).getChildAt(0);
        if (iv.getVisibility() == View.VISIBLE) {
            ScaleAnimation anim = new ScaleAnimation(1, 0, 1, 0, Animation.RELATIVE_TO_SELF,
                    0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
            anim.setDuration(300);
            anim.setFillAfter(true);
            iv.startAnimation(anim);
            if (iv.getTag() != null && iv.getTag() instanceof HideIvRunnable) {
                iv.removeCallbacks((Runnable) iv.getTag());
            }
            HideIvRunnable r = new HideIvRunnable(iv);
            iv.setTag(r);
            iv.postDelayed(r, 300);
        }
    }
}
 
源代码3 项目: Linphone4Android   文件: CallActivity.java
private boolean displayCallStatusIconAndReturnCallPaused(LinearLayout callView, LinphoneCall call) {
	boolean isCallPaused, isInConference;
	ImageView callState = (ImageView) callView.findViewById(R.id.call_pause);
	callState.setTag(call);
	callState.setOnClickListener(this);

	if (call.getState() == State.Paused || call.getState() == State.PausedByRemote || call.getState() == State.Pausing) {
		callState.setImageResource(R.drawable.pause);
		isCallPaused = true;
		isInConference = false;
	} else if (call.getState() == State.OutgoingInit || call.getState() == State.OutgoingProgress || call.getState() == State.OutgoingRinging) {
		isCallPaused = false;
		isInConference = false;
	} else {
		isInConference = isConferenceRunning && call.isInConference();
		isCallPaused = false;
	}

	return isCallPaused || isInConference;
}
 
源代码4 项目: ZoomPreviewPicture   文件: MyPagerAdaper.java
@Override
public Object instantiateItem(ViewGroup container,   int position) {
    ImageView view = (ImageView) LayoutInflater.from(mContext).inflate(R.layout.item_image2, container, false);
    Glide.with(mContext)
            .load(mThumbViewInfoList.get(position).getUrl())
            .error(R.mipmap.ic_iamge_zhanwei)
            .into(view);
    view.setTag(R.id.iv, position);
    view.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            setRect(v);
            GPreviewBuilder.from((Activity) mContext)
                    .setData(mThumbViewInfoList)
                    .setSingleShowType(false)
                    .setCurrentIndex((Integer) v.getTag(R.id.iv))
                    .setType(GPreviewBuilder.IndicatorType.Dot)
                    .start();
        }
    });
    container.addView(view);
    return view;
}
 
private void onBindDeviceType(ImageView clientBtn, ThreadRowInfo row) {
    String deviceType = row.getFromClientModel();

    if (TextUtils.isEmpty(deviceType)) {
        clientBtn.setVisibility(View.GONE);
    } else {
        switch (deviceType) {
            case DEVICE_TYPE_IOS:
                clientBtn.setImageResource(R.drawable.ic_apple_12dp);
                break;
            case DEVICE_TYPE_WP:
                clientBtn.setImageResource(R.drawable.ic_windows_12dp);
                break;
            case DEVICE_TYPE_ANDROID:
                clientBtn.setImageResource(R.drawable.ic_android_12dp);
                break;
            default:
                clientBtn.setImageResource(R.drawable.ic_smartphone_12dp);
                break;
        }
        clientBtn.setTag(row);
        clientBtn.setVisibility(View.VISIBLE);
    }
}
 
源代码6 项目: financisto   文件: TransactionInfoDialog.java
private void add(LinearLayout layout, int labelId, String data, String pictureFileName) {
    View v = inflater.new PictureBuilder(layout)
            .withPicture(context, pictureFileName)
            .withLabel(labelId)
            .withData(data)
            .create();
    v.setClickable(false);
    v.setFocusable(false);
    v.setFocusableInTouchMode(false);
    ImageView pictureView = v.findViewById(R.id.picture);
    pictureView.setTag(pictureFileName);
}
 
源代码7 项目: YCCustomText   文件: HyperTextEditor.java
/**
 * 生成图片View
 */
private FrameLayout createImageLayout() {
	FrameLayout layout = (FrameLayout) inflater.inflate(R.layout.hte_edit_imageview, null);
	layout.setTag(viewTagIndex++);
	ImageView closeView = layout.findViewById(R.id.image_close);
	FrameLayout.LayoutParams layoutParams = (LayoutParams) closeView.getLayoutParams();
	layoutParams.bottomMargin = HyperLibUtils.dip2px(layout.getContext(),10.0f);
	switch (delIconLocation){
		//左上角
		case 1:
			layoutParams.gravity = Gravity.TOP | Gravity.START;
			closeView.setLayoutParams(layoutParams);
			break;
		//右上角
		case 2:
			layoutParams.gravity = Gravity.TOP | Gravity.END;
			closeView.setLayoutParams(layoutParams);
			break;
		//左下角
		case 3:
			layoutParams.gravity = Gravity.BOTTOM | Gravity.START;
			closeView.setLayoutParams(layoutParams);
			break;
		//右下角
		case 4:
			layoutParams.gravity = Gravity.BOTTOM | Gravity.END;
			closeView.setLayoutParams(layoutParams);
			break;
		//其他右下角
		default:
			layoutParams.gravity = Gravity.BOTTOM | Gravity.END;
			closeView.setLayoutParams(layoutParams);
			break;
	}
	closeView.setTag(layout.getTag());
	closeView.setOnClickListener(btnListener);
	HyperImageView imageView = layout.findViewById(R.id.edit_imageView);
	imageView.setOnClickListener(btnListener);
	return layout;
}
 
源代码8 项目: RxTools-master   文件: ColorPickerView.java
public void setColorPreview(LinearLayout colorPreview, Integer selectedColor) {
    if (colorPreview == null)
        return;
    this.colorPreview = colorPreview;
    if (selectedColor == null)
        selectedColor = 0;
    int children = colorPreview.getChildCount();
    if (children == 0 || colorPreview.getVisibility() != View.VISIBLE)
        return;

    for (int i = 0; i < children; i++) {
        View childView = colorPreview.getChildAt(i);
        if (!(childView instanceof LinearLayout))
            continue;
        LinearLayout childLayout = (LinearLayout) childView;
        if (i == selectedColor) {
            childLayout.setBackgroundColor(Color.WHITE);
        }
        ImageView childImage = (ImageView) childLayout.findViewById(R.id.image_preview);
        childImage.setClickable(true);
        childImage.setTag(i);
        childImage.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                if (v == null)
                    return;
                Object tag = v.getTag();
                if (tag == null || !(tag instanceof Integer))
                    return;
                setSelectedColor((int) tag);
            }
        });
    }
}
 
源代码9 项目: FireFiles   文件: IconHelper.java
/**
 * Load thumbnails for a directory list item.
 * @param uri The URI for the file being represented.
 * @param mimeType The mime type of the file being represented.
 * @param docFlags Flags for the file being represented.
 * @param iconThumb The itemview's thumbnail icon.
 * @param iconMimeBackground
 * @return
 */
public void loadThumbnail(Uri uri, String path, String mimeType, int docFlags, int docIcon,
                          ImageView iconMime, ImageView iconThumb, View iconMimeBackground) {
    boolean cacheHit = false;

    final String docAuthority = uri.getAuthority();
    String docId = DocumentsContract.getDocumentId(uri);
    final boolean supportsThumbnail = (docFlags & Document.FLAG_SUPPORTS_THUMBNAIL) != 0;
    final boolean allowThumbnail = MimePredicate.mimeMatches(MimePredicate.VISUAL_MIMES, mimeType);
    final boolean showThumbnail = supportsThumbnail && allowThumbnail && mThumbnailsEnabled;
    if (showThumbnail) {
        final Bitmap cachedResult = mCache.get(uri);
        if (cachedResult != null) {
            iconThumb.setImageBitmap(cachedResult);
            cacheHit = true;
            iconMimeBackground.setVisibility(View.GONE);
        } else {
            iconThumb.setImageDrawable(null);
            final LoaderTask task = new LoaderTask(uri, path, mimeType, mThumbSize, iconThumb,
                    iconMime, iconMimeBackground);
            iconThumb.setTag(task);
            ProviderExecutor.forAuthority(docAuthority).execute(task);
        }
    }

    if (cacheHit) {
        iconMime.setImageDrawable(null);
        iconMime.setAlpha(0f);
        iconThumb.setAlpha(1f);
    } else {
        // Add a mime icon if the thumbnail is being loaded in the background.
        iconThumb.setImageDrawable(null);
        iconMime.setImageDrawable(getDocumentIcon(mContext, docAuthority, docId, mimeType, docIcon));
        iconMime.setAlpha(1f);
        iconThumb.setAlpha(0f);
    }
}
 
源代码10 项目: tysq-android   文件: WheelItem.java
/**
 * 初始化
 */
private void init() {
    LinearLayout layout = new LinearLayout(getContext());
    LayoutParams layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT, WheelUtils.dip2px(getContext(),
            WheelConstants
                    .WHEEL_ITEM_HEIGHT));
    layout.setOrientation(LinearLayout.HORIZONTAL);
    layout.setPadding(WheelConstants.WHEEL_ITEM_PADDING, WheelConstants.WHEEL_ITEM_PADDING, WheelConstants
            .WHEEL_ITEM_PADDING, WheelConstants.WHEEL_ITEM_PADDING);
    layout.setGravity(Gravity.CENTER);
    addView(layout, layoutParams);

    // 图片
    mImage = new ImageView(getContext());
    mImage.setTag(WheelConstants.WHEEL_ITEM_IMAGE_TAG);
    mImage.setVisibility(View.GONE);
    LayoutParams imageParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
    imageParams.rightMargin = WheelConstants.WHEEL_ITEM_MARGIN;
    layout.addView(mImage, imageParams);

    // 文本
    mText = new TextView(getContext());
    mText.setTag(WheelConstants.WHEEL_ITEM_TEXT_TAG);
    mText.setEllipsize(TextUtils.TruncateAt.END);
    mText.setSingleLine();
    mText.setIncludeFontPadding(false);
    mText.setGravity(Gravity.CENTER);
    mText.setTextColor(Color.BLACK);
    LayoutParams textParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
    layout.addView(mText, textParams);
}
 
源代码11 项目: FireFiles   文件: IconHelper.java
/**
 * Cancels any ongoing load operations associated with the given ImageView.
 * @param icon
 */
public void stopLoading(ImageView icon) {
    if(null == icon){
        return;
    }
    final LoaderTask oldTask = (LoaderTask) icon.getTag();
    if (oldTask != null) {
        oldTask.preempt();
        icon.setTag(null);
    }
}
 
源代码12 项目: iBeebo   文件: LocalWorker.java
private void playImageViewAnimation(final ImageView view, final Bitmap bitmap) {

        view.setImageBitmap(bitmap);
        resetProgressBarStatues();
        view.setAlpha(0f);
        view.animate().alpha(1.0f).setDuration(500).setListener(new LayerEnablingAnimatorListener(view, null));
        view.setTag(getUrl());

    }
 
源代码13 项目: WheelView   文件: WheelItem.java
/**
 * 初始化
 */
private void init() {
    LinearLayout layout = new LinearLayout(getContext());
    LayoutParams layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT,
            WheelUtils.dip2px(getContext(),
            WheelConstants
                    .WHEEL_ITEM_HEIGHT));
    layout.setOrientation(LinearLayout.HORIZONTAL);
    layout.setPadding(WheelConstants.WHEEL_ITEM_PADDING, WheelConstants.WHEEL_ITEM_PADDING,
            WheelConstants
            .WHEEL_ITEM_PADDING, WheelConstants.WHEEL_ITEM_PADDING);
    layout.setGravity(Gravity.CENTER);
    addView(layout, layoutParams);

    // 图片
    mImage = new ImageView(getContext());
    mImage.setTag(WheelConstants.WHEEL_ITEM_IMAGE_TAG);
    mImage.setVisibility(View.GONE);
    LayoutParams imageParams = new LayoutParams(LayoutParams.WRAP_CONTENT,
            LayoutParams.WRAP_CONTENT);
    imageParams.rightMargin = WheelConstants.WHEEL_ITEM_MARGIN;
    layout.addView(mImage, imageParams);

    // 文本
    mText = new TextView(getContext());
    mText.setTag(WheelConstants.WHEEL_ITEM_TEXT_TAG);
    mText.setEllipsize(TextUtils.TruncateAt.END);
    mText.setSingleLine();
    mText.setIncludeFontPadding(false);
    mText.setGravity(Gravity.CENTER);
    mText.setTextColor(Color.BLACK);
    LayoutParams textParams = new LayoutParams(LayoutParams.MATCH_PARENT,
            LayoutParams.MATCH_PARENT);
    layout.addView(mText, textParams);
}
 
源代码14 项目: NaviBee   文件: FirebaseStorageHelper.java
public static void loadImage(ImageView imageView, String filePath, boolean isThumb, Callback callback) {
    final String tag = filePath;
    imageView.setTag(tag);

    if (isThumb) {
        int where = filePath.lastIndexOf(".");
        filePath = filePath.substring(0, where) + "-thumb" + filePath.substring(where);
    }

    // fs- is for firebase storage caches
    String filename = "fs-"+ sha256(filePath);
    File file = new File(NaviBeeApplication.getInstance().getCacheDir(), filename);

    if (file.exists()) {
        // cache exists
        loadImageFromCacheFile(imageView, file, tag);
        if (callback != null) callback.callback(true);
    } else {
        // cache not exists

        FirebaseStorage storage = FirebaseStorage.getInstance();
        StorageReference storageRef = storage.getReference();
        storageRef = storageRef.child(filePath);
        storageRef.getFile(file).addOnSuccessListener(taskSnapshot -> {
            // Local temp file has been created
            loadImageFromCacheFile(imageView, file, tag);
            if (callback != null) callback.callback(true);
        }).addOnFailureListener(taskSnapshot -> {
            if (callback != null) callback.callback(false);
        });

    }
}
 
源代码15 项目: javaide   文件: ColorPickerView.java
public void setColorPreview(LinearLayout colorPreview, Integer selectedColor) {
	if (colorPreview == null)
		return;
	this.colorPreview = colorPreview;
	if (selectedColor == null)
		selectedColor = 0;
	int children = colorPreview.getChildCount();
	if (children == 0 || colorPreview.getVisibility() != View.VISIBLE)
		return;

	for (int i = 0; i < children; i++) {
		View childView = colorPreview.getChildAt(i);
		if (!(childView instanceof LinearLayout))
			continue;
		LinearLayout childLayout = (LinearLayout) childView;
		if (i == selectedColor) {
			childLayout.setBackgroundColor(Color.WHITE);
		}
		ImageView childImage = (ImageView) childLayout.findViewById(R.id.image_preview);
		childImage.setClickable(true);
		childImage.setTag(i);
		childImage.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				if (v == null)
					return;
				Object tag = v.getTag();
				if (tag == null || !(tag instanceof Integer))
					return;
				setSelectedColor((int) tag);
			}
		});
	}
}
 
源代码16 项目: AndroidAnimationExercise   文件: GamePintuLayout.java
/**
 * 初始化Item
 */
private void initItem() {
    // 获得Item的宽度
    int childWidth = (mWidth - mPadding * 2 - mMargin * (mColumn - 1))
            / mColumn;
    mItemWidth = childWidth;
    mGamePintuItems = new ImageView[mColumn * mColumn];
    // 放置Item
    for (int i = 0; i < mGamePintuItems.length; i++) {
        ImageView item = new ImageView(getContext());

        item.setOnClickListener(this);

        item.setImageBitmap(mItemBitmaps.get(i).bitmap);
        mGamePintuItems[i] = item;

        item.setId(i + 1);
        item.setTag(i + "_" + mItemBitmaps.get(i).index);

        LayoutParams lp = new LayoutParams(mItemWidth,
                mItemWidth);
        // 设置横向边距,不是最后一列
        if ((i + 1) % mColumn != 0) {
            lp.rightMargin = mMargin;
        }
        // 如果不是第一列
        if (i % mColumn != 0) {
            lp.addRule(RelativeLayout.RIGHT_OF,//
                    mGamePintuItems[i - 1].getId());
        }
        // 如果不是第一行,//设置纵向边距,非最后一行
        if ((i + 1) > mColumn) {
            lp.topMargin = mMargin;
            lp.addRule(RelativeLayout.BELOW,//
                    mGamePintuItems[i - mColumn].getId());
        }
        addView(item, lp);
    }

}
 
源代码17 项目: satstat   文件: AbstractTreeViewAdapter.java
public final LinearLayout populateTreeItem(final LinearLayout layout,
        final View childView, final TreeNodeInfo<T> nodeInfo,
        final boolean newChildView) {
    final Drawable individualRowDrawable = getBackgroundDrawable(nodeInfo);
    layout.setBackgroundDrawable(individualRowDrawable == null ? getDrawableOrDefaultBackground(rowBackgroundDrawable)
            : individualRowDrawable);
    final LinearLayout.LayoutParams indicatorLayoutParams = new LinearLayout.LayoutParams(
            calculateIndentation(nodeInfo), LayoutParams.FILL_PARENT);
    final LinearLayout indicatorLayout = (LinearLayout) layout
            .findViewById(R.id.treeview_list_item_image_layout);
    indicatorLayout.setGravity(indicatorGravity);
    indicatorLayout.setLayoutParams(indicatorLayoutParams);
    final ImageView image = (ImageView) layout
            .findViewById(R.id.treeview_list_item_image);
    image.setImageDrawable(getDrawable(nodeInfo));
    image.setScaleType(ScaleType.CENTER);
    image.setTag(nodeInfo.getId());
    image.setOnClickListener(null);
    image.setClickable(false);
    layout.setTag(nodeInfo.getId());
    final FrameLayout frameLayout = (FrameLayout) layout
            .findViewById(R.id.treeview_list_item_frame);
    final FrameLayout.LayoutParams childParams = new FrameLayout.LayoutParams(
            LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
    if (newChildView) {
        frameLayout.addView(childView, childParams);
    }
    frameLayout.setTag(nodeInfo.getId());
    return layout;
}
 
源代码18 项目: Netease   文件: SwitchImage.java
private View initView(int res, String url) {
    View view = LayoutInflater.from(getContext()).inflate(R.layout.item_guide, null);
    ImageView imageView = (ImageView) view.findViewById(R.id.iguide_img);
    //设置ImageView的超链接
    imageView.setTag(url);
    imageView.setImageResource(res);

    //hold imageView
    imageViewList.add(imageView);
    return view;
}
 
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {

    ArrayList<Button> inAppButtons = new ArrayList<>();
    View inAppView = inflater.inflate(R.layout.inapp_cover, container, false);

    FrameLayout fl  = inAppView.findViewById(R.id.inapp_cover_frame_layout);

    RelativeLayout relativeLayout = fl.findViewById(R.id.cover_relative_layout);
    relativeLayout.setBackgroundColor(Color.parseColor(inAppNotification.getBackgroundColor()));
    LinearLayout linearLayout = relativeLayout.findViewById(R.id.cover_linear_layout);
    Button mainButton = linearLayout.findViewById(R.id.cover_button1);
    inAppButtons.add(mainButton);
    Button secondaryButton = linearLayout.findViewById(R.id.cover_button2);
    inAppButtons.add(secondaryButton);
    ImageView imageView = relativeLayout.findViewById(R.id.backgroundImage);

    if(inAppNotification.getInAppMediaForOrientation(currentOrientation) != null) {
        if (inAppNotification.getImage(inAppNotification.getInAppMediaForOrientation(currentOrientation)) != null) {
            imageView.setImageBitmap(inAppNotification.getImage(inAppNotification.getInAppMediaForOrientation(currentOrientation)));
            imageView.setTag(0);
            imageView.setOnClickListener(new CTInAppNativeButtonClickListener());
        }
    }

    TextView textView1 = relativeLayout.findViewById(R.id.cover_title);
    textView1.setText(inAppNotification.getTitle());
    textView1.setTextColor(Color.parseColor(inAppNotification.getTitleColor()));

    TextView textView2 = relativeLayout.findViewById(R.id.cover_message);
    textView2.setText(inAppNotification.getMessage());
    textView2.setTextColor(Color.parseColor(inAppNotification.getMessageColor()));


    ArrayList<CTInAppNotificationButton> buttons = inAppNotification.getButtons();
    if(buttons.size() ==1){
        if(currentOrientation == Configuration.ORIENTATION_LANDSCAPE){
            mainButton.setVisibility(View.GONE);
        }else if(currentOrientation == Configuration.ORIENTATION_PORTRAIT){
            mainButton.setVisibility(View.INVISIBLE);
        }
        setupInAppButton(secondaryButton,buttons.get(0),0);
    }
    else if (!buttons.isEmpty()) {
        for(int i=0; i < buttons.size(); i++) {
            if (i >= 2) continue; // only show 2 buttons
            CTInAppNotificationButton inAppNotificationButton = buttons.get(i);
            Button button = inAppButtons.get(i);
            setupInAppButton(button,inAppNotificationButton,i);
        }
    }

    @SuppressLint("ResourceType")
    CloseImageView closeImageView = fl.findViewById(199272);

    closeImageView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            didDismiss(null);
            getActivity().finish();
        }
    });

    if(!inAppNotification.isHideCloseButton())
        closeImageView.setVisibility(View.GONE);
    else
        closeImageView.setVisibility(View.VISIBLE);

    return inAppView;
}
 
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    if (convertView == null) {
        convertView = mLayoutInflater.inflate(mLayoutResourceId, parent, false);
    }

   TextView userNameTextView = (TextView) convertView.findViewById(R.id.accountAdapter_name);

    ReceiptData receipt = getItem(position);
    RoomMember member = mRoom.getMember(receipt.userId);

    if (null == member) {
        userNameTextView.setText(receipt.userId);
    } else {
        userNameTextView.setText(member.getName());
    }

    TextView tsTextView = (TextView) convertView.findViewById(R.id.read_receipt_ts);

    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());

    SpannableStringBuilder body = new SpannableStringBuilder(mContext.getString(org.matrix.console.R.string.read_receipt) + " : " + dateFormat.format(new Date(receipt.originServerTs)));
    body.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD), 0, mContext.getString(org.matrix.console.R.string.read_receipt).length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
    tsTextView.setText(body);

    ImageView imageView = (ImageView) convertView.findViewById(R.id.avatar_img);
    imageView.setTag(null);
    imageView.setImageResource(R.drawable.ic_contact_picture_holo_light);
    String url = member.avatarUrl;

    if (TextUtils.isEmpty(url)) {
        url = ContentManager.getIdenticonURL(member.getUserId());
    }

    if (!TextUtils.isEmpty(url)) {
        int size = getContext().getResources().getDimensionPixelSize(R.dimen.member_list_avatar_size);
        mMediasCache.loadAvatarThumbnail(mHsConfig, imageView, url, size);
    }

    // The presence ring
    ImageView presenceRing = (ImageView) convertView.findViewById(R.id.imageView_presenceRing);
    presenceRing.setColorFilter(mContext.getResources().getColor(android.R.color.transparent));

    return convertView;
}