Frameworks
React Native
Flutter
Package samples
Cookbook
Version 11
Version 10
Version 9
Version 8
Version 7
Version 6
Version 5
The AnnotationStyleDialogFragment
can be customized using Android styles or with ToolManagerBuilder
, depending on the specific property that needs to be customized.
Android styles are used to customize the color picker, preset annotations, and icon picker.
ToolManagerBuilder
is used to customize the annotation style dialog properties.
Standard colors are colors presented in the grid layout of the color picker.
To change these colors, you can override the standard color list as follows:
res/values/arrays.xml
file of your project, define a string-array
containing your custom color list:res/values/styles.xml
file, define your own style and inherit PresetColorGridViewStyle
, then set your color list custom_standard_colors
to the color_list
attribute:CustomPresetColorGridStyle
to the preset_colors_style
attribute in your application's theme:An annotation preset style defines a group of annotation style attributes. Presets allow users to conveniently change the annotation's appearance with only one tap. You can override existing annotation presets and define your own in your app.
In this tutorial you will implement custom annotation presets for Text
(sticky note) annotations.
res/values/styles.xml
file of your project, create a series of customized annotation styles. For more detail on annotation style attributes, see tool style attributes.res/values/arrays.xml
file of your project, define an array
containing your customized presets:custom_presets
array to the sticky_note_presets
attribute:If you want to change the presets for a different annotation type, refer to the attribute presets table to find the appropriate attribute.Preset attribute | Annotation type | Default presets preview |
---|---|---|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
| other annotation types |
The icon picker for Text
(sticky note) annotations allows users to choose their own icon:
Below is the list of icons available for Text
(sticky note) annotations:
Icon name | Icon |
---|---|
Comment | |
Help | |
InsertCaret | |
Star | |
LightBulb | |
NewParagraph | |
CrossMark | |
CheckMark | |
LocationPin | |
ThumbsUp |
You can also create your own list by using the icons above:
res/values/arrays.xml
file. Each item in the list represents the icon name defined in the table above.custom_icons
array to the sticky_note_icons
attribute in your application theme:If you want to add a custom icon to the sticky note icon picker, please refer to [this guide](/android/guides/cookbook/customize-sticky-note-icon) for more details.
Hide properties in the annotation style dialog By default, each annotation type will contain it's own set of annotation style properties. You can hide these defined properties by using `ToolManagerBuilder` as follows:
If the property is not defined for a annotation type (for example font property is not defined for rectangle annotations), setting the CanShow
property will not do anything.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales