code: private void obtainScrollableArea(@StyleRes final int themeResourceId) {
          TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
                  new int[]{R.attr.materialDialogScrollableAreaTop,
                          R.attr.materialDialogScrollableAreaBottom});
          int topIndex = typedArray.getInt(0, -1);
          int bottomIndex = typedArray.getInt(1, -1);
  
          if (topIndex != -1) {
              Area top = Area.fromIndex(topIndex);
  
              if (bottomIndex != -1) {
                  Area bottom = Area.fromIndex(bottomIndex);
                  setScrollableArea(top, bottom);
              } else {
                  setScrollableArea(top);
              }
          } else {
              setScrollableArea(null, null);
          }
      }
docs: Obtains the scrollable area from a specific theme.
  
  @param themeResourceId
  The resource id of the theme, the scrollable area should be obtained from, as an
  {@link Integer} value