code: public int addLayer(Drawable dr) {
          final ChildDrawable layer = createLayer(dr);
          final int index = addLayer(layer);
          ensurePadding();
          refreshChildPadding(index, layer);
          return index;
      }
docs: Adds a new layer containing the specified {@code drawable} to the end of the layer list and
  returns its index.
  
  @param dr The drawable to add as a new layer.
  @return The index of the new layer.