@Override
  protected void onDetachedFromWindow() {
    super.onDetachedFromWindow();

    // Makes a copy of the array, however we cannot do this otherwise.
    for (Drawable drawable : getCompoundDrawables()) {
      stopIfAnimatable(drawable);
    }
  }