From 96f5821c9f366f927f7de1b4be3653385e552c50 Mon Sep 17 00:00:00 2001 From: Ezerous Date: Sat, 27 Jun 2020 20:41:19 +0300 Subject: [PATCH] Use a consistent guest avatar --- app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java | 6 +----- .../main/java/gr/thmmy/mthmmy/base/BaseApplication.java | 8 ++------ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java b/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java index d31b7993..733e12b8 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java @@ -490,11 +490,7 @@ public abstract class BaseActivity extends AppCompatActivity { } private void setDefaultAvatar() { - profileDrawerItem.withIcon(new IconicsDrawable(this) - .icon(FontAwesome.Icon.faw_user) - .paddingDp(10) - .color(ContextCompat.getColor(this, R.color.iron)) - .backgroundColor(ContextCompat.getColor(this, R.color.primary_lighter))); + profileDrawerItem.withIcon(R.drawable.ic_default_user_avatar); } //-------------------------------------------LOGOUT------------------------------------------------- diff --git a/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java b/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java index 49ff1c0e..131ae24b 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java +++ b/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java @@ -179,12 +179,8 @@ public class BaseApplication extends MultiDexApplication { @Override public Drawable placeholder(Context ctx, String tag) { - if (DrawerImageLoader.Tags.PROFILE.name().equals(tag)) { - return new IconicsDrawable(ctx).icon(FontAwesome.Icon.faw_user) - .paddingDp(10) - .color(ContextCompat.getColor(ctx, R.color.iron)) - .backgroundColor(ContextCompat.getColor(ctx, R.color.primary_lighter)); - } + if (DrawerImageLoader.Tags.PROFILE.name().equals(tag)) + return BaseApplication.getInstance().getResources().getDrawable(R.drawable.ic_default_user_avatar); return super.placeholder(ctx, tag); } });