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() {
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-------------------------------------------------

8
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);
}
});

Loading…
Cancel
Save