Browse Source

Use a consistent guest avatar

pull/70/head
Ezerous 5 years ago
parent
commit
96f5821c9f
  1. 6
      app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java
  2. 8
      app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java

6
app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java

@ -490,11 +490,7 @@ public abstract class BaseActivity extends AppCompatActivity {
} }
private void setDefaultAvatar() { private void setDefaultAvatar() {
profileDrawerItem.withIcon(new IconicsDrawable(this) profileDrawerItem.withIcon(R.drawable.ic_default_user_avatar);
.icon(FontAwesome.Icon.faw_user)
.paddingDp(10)
.color(ContextCompat.getColor(this, R.color.iron))
.backgroundColor(ContextCompat.getColor(this, R.color.primary_lighter)));
} }
//-------------------------------------------LOGOUT------------------------------------------------- //-------------------------------------------LOGOUT-------------------------------------------------

8
app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java

@ -179,12 +179,8 @@ public class BaseApplication extends MultiDexApplication {
@Override @Override
public Drawable placeholder(Context ctx, String tag) { public Drawable placeholder(Context ctx, String tag) {
if (DrawerImageLoader.Tags.PROFILE.name().equals(tag)) { if (DrawerImageLoader.Tags.PROFILE.name().equals(tag))
return new IconicsDrawable(ctx).icon(FontAwesome.Icon.faw_user) return BaseApplication.getInstance().getResources().getDrawable(R.drawable.ic_default_user_avatar);
.paddingDp(10)
.color(ContextCompat.getColor(ctx, R.color.iron))
.backgroundColor(ContextCompat.getColor(ctx, R.color.primary_lighter));
}
return super.placeholder(ctx, tag); return super.placeholder(ctx, tag);
} }
}); });

Loading…
Cancel
Save