|
|
|
@ -1,6 +1,10 @@
|
|
|
|
|
package me.impy.aegis.ui.views;
|
|
|
|
|
|
|
|
|
|
import android.graphics.Bitmap;
|
|
|
|
|
import android.graphics.BitmapFactory;
|
|
|
|
|
import android.graphics.PorterDuff;
|
|
|
|
|
import android.graphics.drawable.BitmapDrawable;
|
|
|
|
|
import android.graphics.drawable.Drawable;
|
|
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
|
|
import android.view.View;
|
|
|
|
|
import android.widget.ImageView;
|
|
|
|
@ -61,8 +65,17 @@ public class KeyProfileHolder extends RecyclerView.ViewHolder {
|
|
|
|
|
_profileIssuer.setText(" - " + profile.getEntry().getInfo().getIssuer());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (profile.getEntry().getInfo().getImage() != null)
|
|
|
|
|
{
|
|
|
|
|
byte[] imageBytes = profile.getEntry().getInfo().getImage();
|
|
|
|
|
Bitmap image = BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length);
|
|
|
|
|
_profileDrawable.setImageBitmap(image);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
TextDrawable drawable = profile.getDrawable();
|
|
|
|
|
_profileDrawable.setImageDrawable(drawable);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
refreshCode();
|
|
|
|
|
}
|
|
|
|
|