Commit b3516ddd authored by Tiago Cunha's avatar Tiago Cunha Committed by GitHub

Merge pull request #105 from RocketChat/fix/issue-101

Fixes crash with placeholder vector
parents f9935267 35e1432d
......@@ -5,6 +5,7 @@ import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.support.graphics.drawable.VectorDrawableCompat;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
......@@ -132,8 +133,8 @@ public class RocketChatMessageAttachmentsLayout extends LinearLayout {
.downloader(getDownloader())
.build()
.load(absolutize(imageURL))
.placeholder(R.drawable.image_dummy)
.error(R.drawable.image_error)
.placeholder(VectorDrawableCompat.create(getResources(), R.drawable.image_dummy, null))
.error(VectorDrawableCompat.create(getResources(), R.drawable.image_error, null))
.into((ImageView) attachmentView.findViewById(R.id.image));
TextView titleView = (TextView) attachmentView.findViewById(R.id.title);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment