Use larger version of ic_contact_picture in calls

Closes #4971
Fixes #4245
// FREEBIE
This commit is contained in:
haffenloher
2015-12-27 01:34:44 +01:00
committed by Moxie Marlinspike
parent 1e2a45d440
commit 1abf39685a
9 changed files with 35 additions and 22 deletions

View File

@@ -37,8 +37,12 @@ public class ContactPhotoFactory {
}
public static ContactPhoto getContactPhoto(Context context, Uri uri, String name) {
int targetSize = context.getResources().getDimensionPixelSize(R.dimen.contact_photo_target_size);
return getContactPhoto(context, uri, name, targetSize);
}
public static ContactPhoto getContactPhoto(Context context, Uri uri, String name, int targetSize) {
try {
int targetSize = context.getResources().getDimensionPixelSize(R.dimen.contact_photo_target_size);
Bitmap bitmap = Glide.with(context)
.load(new ContactPhotoUri(uri)).asBitmap()
.centerCrop().into(targetSize, targetSize).get();

View File

@@ -48,6 +48,6 @@ public class GeneratedContactPhoto implements ContactPhoto {
@Override
public Drawable asCallCard(Context context) {
return ContextCompat.getDrawable(context, R.drawable.ic_contact_picture);
return ContextCompat.getDrawable(context, R.drawable.ic_contact_picture_large);
}
}