Interface AnnotationCreationToolbar.ItemToAnnotationToolMapper
-
- All Implemented Interfaces:
public interface AnnotationCreationToolbar.ItemToAnnotationToolMapper
A mapper that allows you to map the IDs of AnnotationCreationToolbar menu items with the annotation tool (and variant) you want it to activate/deactivate. The annotation creation toolbar will automatically handle all the logic.
-
-
Method Summary
Modifier and Type Method Description abstract SparseArray<Pair<AnnotationTool, AnnotationToolVariant>>
getItemToAnnotationToolMapping()
Gets the sparse array mapping contextual toolbar menu item ids with the pair of annotation tool and its variant that it handles. abstract boolean
isStyleIndicatorCircleEnabled(@IdRes() int itemId)
Whether the icon of item with specified ID should display the current properties used by its mapped tool. -
-
Method Detail
-
getItemToAnnotationToolMapping
@NonNull() abstract SparseArray<Pair<AnnotationTool, AnnotationToolVariant>> getItemToAnnotationToolMapping()
Gets the sparse array mapping contextual toolbar menu item ids with the pair of annotation tool and its variant that it handles.
- Returns:
Sparse array of item IDs mapped to the annotation tools and variants they handle.
-
isStyleIndicatorCircleEnabled
abstract boolean isStyleIndicatorCircleEnabled(@IdRes() int itemId)
Whether the icon of item with specified ID should display the current properties used by its mapped tool. The style indicator is shown in the top left corner of the item's icon. If the provided ID is not mapped to any annotation tool, this will have no effect.
- Parameters:
itemId
- ID of the item for which the style indicator should be displayed or not.- Returns:
true
to display the style indicator for the item,false
otherwise.
-
-
-
-