code: public int getId(int index) {
          if (index >= mLayerState.mNum) {
              throw new IndexOutOfBoundsException();
          }
          return mLayerState.mChildren[index].mId;
      }
docs: Returns the ID of the specified layer.
  
  @param index The index of the layer, must be in the range {@code 0...getNumberOfLayers()-1}.
  @return The id of the layer or {@link android.view.View#NO_ID} if the layer has no id.
  @attr ref android.R.styleable#LayerDrawableItem_id
  @see #setId(int, int)