docs: private void updateStateFromTypedArray(TypedArray a) {
          final LayerState state = mLayerState;
  
          // Account for any configuration changes.
          state.mChangingConfigurations |= TypedArrayCompat.getChangingConfigurations(a);
  
          // Extract the theme attributes, if any.
          state.mThemeAttrs = TypedArrayCompat.extractThemeAttrs(a);
  
          final int N = a.getIndexCount();
          for (int i = 0; i < N; i++) {
              int attr = a.getIndex(i);
              if (attr == R.styleable.LayerDrawable_android_opacity) {
                  state.mOpacityOverride = a.getInt(attr, state.mOpacityOverride);
              } else if (attr == R.styleable.LayerDrawable_android_paddingTop) {
                  state.mPaddingTop = a.getDimensionPixelOffset(attr, state.mPaddingTop);
              } else if (attr == R.styleable.LayerDrawable_android_paddingBottom) {
                  state.mPaddingBottom = a.getDimensionPixelOffset(attr, state.mPaddingBottom);
              } else if (attr == R.styleable.LayerDrawable_android_paddingLeft) {
                  state.mPaddingLeft = a.getDimensionPixelOffset(attr, state.mPaddingLeft);
              } else if (attr == R.styleable.LayerDrawable_android_paddingRight) {
                  state.mPaddingRight = a.getDimensionPixelOffset(attr, state.mPaddingRight);
              } else if (attr == R.styleable.LayerDrawable_android_paddingStart) {
                  state.mPaddingStart = a.getDimensionPixelOffset(attr, state.mPaddingStart);
              } else if (attr == R.styleable.LayerDrawable_android_paddingEnd) {
                  state.mPaddingEnd = a.getDimensionPixelOffset(attr, state.mPaddingEnd);
              } else if (attr == R.styleable.LayerDrawable_android_autoMirrored) {
                  state.mAutoMirrored = a.getBoolean(attr, state.mAutoMirrored);
              } else if (attr == R.styleable.LayerDrawable_android_paddingMode) {
                  state.mPaddingMode = a.getInteger(attr, state.mPaddingMode);
              }
          }
      }