@Override public void setImageDrawable(Drawable drawable) { if (drawable != null && KlyphPreferences.isRoundedPictureEnabled() == true) { PicassoDrawable pDrawable = (PicassoDrawable) drawable; super.setImageDrawable(new BitmapDrawable(getContext() .getResources(), BitmapUtil.getCirleBitmap( pDrawable.getImage().getBitmap(), AttrUtil.getColor( getContext(), R.attr.profileIconBackgroundColor)))); } else { super.setImageDrawable(drawable); } }
@Override public void setImageDrawable(Drawable drawable) { super.setImageDrawable(drawable); if (drawable instanceof PicassoDrawable) { PicassoDrawable pDrawable = (PicassoDrawable) drawable; BitmapDrawable bitmapDrawable = (BitmapDrawable) pDrawable.getImage(); if (bitmapDrawable.getBitmap() != null) { bmWidth = bitmapDrawable.getBitmap().getWidth(); bmHeight = bitmapDrawable.getBitmap().getHeight(); } } }
@Override public void setImageDrawable(Drawable drawable) { if (KlyphPreferences.isRoundedPictureEnabled() && drawable instanceof PicassoDrawable) { super.setImageDrawable(new RoundedAvatarDrawable(((PicassoDrawable) drawable).getImage().getBitmap())); } else { super.setImageDrawable(drawable); } }
@Override public void setImageDrawable(Drawable drawable) { if (MessengerPreferences.isRoundedPictureEnabled() && drawable instanceof PicassoDrawable) { super.setImageDrawable(new RoundedAvatarDrawable(((PicassoDrawable) drawable).getImage().getBitmap())); } else { super.setImageDrawable(drawable); } }