code: private void setActivatedOnViewGroup(@NonNull final ViewGroup viewGroup,
                                           final boolean activated) {
          viewGroup.setActivated(activated);
  
          for (int i = 0; i < viewGroup.getChildCount(); i++) {
              View child = viewGroup.getChildAt(i);
  
              if (child instanceof ViewGroup) {
                  setActivatedOnViewGroup((ViewGroup) child, activated);
              } else {
                  child.setActivated(activated);
              }
          }
      }
docs: Adapts the activated state of all children of a specific view group.
  
  @param viewGroup
  The view group, whose children's activated states should be adapted, as an instance
  of the class {@link ViewGroup}. The view group may not be null
  @param activated
  True, if the children should be activated, false otherwise