Java 类com.squareup.picasso.PicassoDrawable 实例源码

项目:Klyph    文件:BorderedProfileImageView.java   
@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);
    }
}
项目:Klyph    文件:TouchImageView.java   
@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();
        }
    }
}
项目:Klyph    文件:ProfileImageView.java   
@Override
public void setImageDrawable(Drawable drawable)
{
    if (KlyphPreferences.isRoundedPictureEnabled() && drawable instanceof PicassoDrawable)
    {
        super.setImageDrawable(new RoundedAvatarDrawable(((PicassoDrawable) drawable).getImage().getBitmap()));
    }
    else
    {
        super.setImageDrawable(drawable);
    }
}
项目:KlyphMessenger    文件:ProfileImageView.java   
@Override
public void setImageDrawable(Drawable drawable)
{
    if (MessengerPreferences.isRoundedPictureEnabled() && drawable instanceof PicassoDrawable)
    {
        super.setImageDrawable(new RoundedAvatarDrawable(((PicassoDrawable) drawable).getImage().getBitmap()));
    }
    else
    {
        super.setImageDrawable(drawable);
    }
}