set Menu Item Grouping Rule
Deprecated
Implement ContextualToolbarGroupingProvider and register it with setContextualToolbarGroupingProvider instead.
Registers a legacy MenuItemGroupingRule for one contextual toolbar kind — the deprecated successor of setting a rule on that kind's View toolbar instance (AnnotationToolbar, DocumentEditingToolbar). Only PresetMenuItemGroupingRule subclasses are honored (their getGroupPreset() is pure data); custom groupMenuItems(...) overrides cannot be bridged. Pass null to clear that kind's rule.
Rules for different kinds coexist; each applies only to its own bar. Registering any rule occupies the coordinator's grouping-provider slot with the bridge — combining legacy rules with a custom ContextualToolbarGroupingProvider is not supported (last registration wins), migrate fully to the provider instead.
Scheduled for removal together with MenuItemGroupingRule at the next major version.
Deprecated
Implement ContextualToolbarGroupingProvider and register it with setContextualToolbarGroupingProvider instead.
Registers a legacy MenuItemGroupingRule with the Compose annotation creation toolbar — the deprecated successor of the View AnnotationToolbar.setMenuItemGroupingRule. Equivalent to the kind-scoped overload with ContextualToolbarKind.Annotation. Pass null to clear.
Scheduled for removal together with MenuItemGroupingRule at the next major version.