@Override
  public boolean isStateful() {
    if (!mIsStatefulCalculated) {
      mIsStateful = false;
      for (int i = 0; i < mLayers.length; i++) {
        Drawable drawable = mLayers[i];
        mIsStateful |= drawable != null && drawable.isStateful();
      }
      mIsStatefulCalculated = true;
    }
    return mIsStateful;
  }
Sets a new drawable at the specified index, and return the previous drawable, if any.
drawee/src/main/java/com/facebook/drawee/drawable/ArrayDrawable.java