java类com.squareup.picasso.PicassoDrawable的实例源码

BorderedProfileImageView.java 文件源码 项目:Klyph 阅读 20 收藏 0 点赞 0 评论 0
@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);
    }
}
TouchImageView.java 文件源码 项目:Klyph 阅读 23 收藏 0 点赞 0 评论 0
@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();
        }
    }
}
ProfileImageView.java 文件源码 项目:Klyph 阅读 24 收藏 0 点赞 0 评论 0
@Override
public void setImageDrawable(Drawable drawable)
{
    if (KlyphPreferences.isRoundedPictureEnabled() && drawable instanceof PicassoDrawable)
    {
        super.setImageDrawable(new RoundedAvatarDrawable(((PicassoDrawable) drawable).getImage().getBitmap()));
    }
    else
    {
        super.setImageDrawable(drawable);
    }
}
ProfileImageView.java 文件源码 项目:KlyphMessenger 阅读 27 收藏 0 点赞 0 评论 0
@Override
public void setImageDrawable(Drawable drawable)
{
    if (MessengerPreferences.isRoundedPictureEnabled() && drawable instanceof PicassoDrawable)
    {
        super.setImageDrawable(new RoundedAvatarDrawable(((PicassoDrawable) drawable).getImage().getBitmap()));
    }
    else
    {
        super.setImageDrawable(drawable);
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号