code: @SuppressLint("InflateParams")
      private View inflateLayout(final Activity activity) {
          LayoutInflater inflater = activity.getLayoutInflater();
          View view = inflater.inflate(R.layout.remove_preference_header_dialog, null);
          setView(view);
          return view;
      }
docs: Inflates the layout of the dialog.
  
  @param activity
  The activity, the dialog should belong to, as an instance of the class {@link
  Activity}
  @return The view, which has been inflated, as an instance of the class {@link View}