code: @Nullable
      public static Drawable matchText(Context context, @DrawableRes int drawableId, TextView text) {
          Drawable d = context.getDrawable(drawableId);
          if (d != null) {
              int size = Math.round(text.getTextSize());
              d.setBounds(0, 0, size, size);
              d.setTint(text.getCurrentTextColor());
          }
          return d;
      }
docs: Set the Drawable's size and tint to be the same as the text.
  
  @return null if the drawable does not exist
  @since 4.0.0