Example #1
0
  public enum SocialType {
    google(
        GOOGLE_SOCIAL_IDENTIFIER,
        ContextCompat.getDrawable(
            MainApplication.getAppContext(), R.drawable.ic_google_plus_new_icon_logo)),
    facebook(
        FACEBOOK_SOCIAL_IDENTIFIER,
        ContextCompat.getDrawable(MainApplication.getAppContext(), R.drawable.ic_facebook)),
    mailru(
        MAILRU_SOCIAL_IDENTIFIER,
        ContextCompat.getDrawable(MainApplication.getAppContext(), R.drawable.ic_it)),
    twitter(
        TWITTER_SOCIAL_IDENTIFIER,
        ContextCompat.getDrawable(MainApplication.getAppContext(), R.drawable.ic_twitter)),
    vk(
        VK_SOCIAL_IDENTIFIER,
        ContextCompat.getDrawable(MainApplication.getAppContext(), R.drawable.ic_vk)),
    github(
        GITHUB_SOCIAL_IDENTIFIER,
        ContextCompat.getDrawable(MainApplication.getAppContext(), R.drawable.ic_github));

    private String identifier;
    private Drawable icon;

    SocialType(String identifier, Drawable drawable) {
      this.identifier = identifier;
      this.icon = drawable;
    }

    public String getIdentifier() {
      return identifier;
    }

    public Drawable getIcon() {
      return icon;
    }
  }
 @Override
 protected void injectComponent() {
   MainApplication.component().plus(new NotificationModule()).inject(this);
 }