Note: This action is not recursive, and will only remove a preference if it exists in this group, ignoring preferences found in nested groups. Use removePreferenceRecursively(CharSequence) to recursively find and remove a preference.
Sets the maximal number of children that are shown when the preference group is launched where the rest of the children will be hidden. If some children are hidden an expand button will be provided to show all the hidden children. Any child in any level of the hierarchy that is also a preference group (e.g. preference category) will not be counted towards the limit. But instead the children of such group will be counted. By default, all children will be shown, so the default value of this attribute is equal to Integer.MAX_VALUE.
Note: The group should have a key defined if an expandable preference is present to correctly persist state.
Returns the Context of this preference. Each preference in a preference hierarchy can be from different Context (for example, if multiple activities provide preferences into a single PreferenceFragmentCompat). This Context will be used to save the preference values.