code: public int findIndexByLayerId(int id) {
          final ChildDrawable[] layers = mLayerState.mChildren;
          final int N = mLayerState.mNum;
          for (int i = 0; i < N; i++) {
              final ChildDrawable childDrawable = layers[i];
              if (childDrawable.mId == id) {
                  return i;
              }
          }
  
          return -1;
      }
docs: Returns the layer with the specified {@code id}.
  <p/>
  If multiple layers have the same ID, returns the layer with the lowest index.
  
  @param id The ID of the layer to return.
  @return The index of the layer with the specified ID.