preference/src/main/java/androidx/preference/CollapsiblePreferenceGroupController.java
public boolean onPreferenceVisibilityChange(Preference preference) {
        if (mHasExpandablePreference) {
            // We only want to show up to the maximal number of preferences. Preference visibility
            // change can result in the expand button being added/removed, as well as changes to
            // its summary. Rebuild to ensure that the correct data is shown.
            mPreferenceGroupAdapter.onPreferenceHierarchyChange(preference);
            return true;
        }
        return false;
    }
/**
     * Called when a preference has changed its visibility.
     *
     * @param preference The preference whose visibility has changed.
     * @return {@code true} if view update has been handled by this controller.
     */
Called when a preference has changed its visibility.
@param preference The preference whose visibility has changed.
@return  true if view update has been handled by this controller.
Called when a preference has changed its visibility . @param preference The preference whose visibility has changed . @return true if view update has been handled by this controller .
public boolean onPreferenceVisibilityChange(Preference preference) {
        if (mHasExpandablePreference) {
            mPreferenceGroupAdapter.onPreferenceHierarchyChange(preference);
            return true;
        }
        return false;
    }
public boolean onPreferenceVisibilityChange ( Preference preference ) { if ( mHasExpandablePreference ) { mPreferenceGroupAdapter . onPreferenceHierarchyChange ( preference ) ; return true ; } return false ; }
Called when a preference has changed its visibility.
Called when a preference has changed its visibility .
// We only want to show up to the maximal number of preferences. Preference visibility // change can result in the expand button being added/removed, as well as changes to // its summary. Rebuild to ensure that the correct data is shown.