code: public void save(@NonNull View view) {
      int viewId = view.getId();
      Preconditions.checkArgument(viewId != 0,
          "Cannot save state for View with no id " + view.getClass().getSimpleName());
      SparseArray<Parcelable> state = new SparseArray<>();
      view.saveHierarchyState(state);
      viewStateById.put(viewId, state);
    }
docs: Save view hierarchy state so it can be restored later from {@link #restore(View)}.  The view
  must have a non-zero id.