code: public static LoadingLayout wrap(final View targetView, final int progressBarStyle){
          if(targetView==null){
              throw new IllegalArgumentException();
          }
  
          final LoadingLayout loadingLayout = new LoadingLayout(targetView.getContext()){
              @Override
              protected View createProgressBar() {
                  return new ProgressBar(getContext(),null,progressBarStyle);
              }
          };
          loadingLayout.attachTo(targetView);
          return loadingLayout;
      }
docs: create a LoadingLayout to wrap and replace the targetView.
  Note: if you attachTo targetView on 'onCreate' method,targetView may be not layout complete.
  
  @param targetView
  @return