Some test text!

Search
Hamburger Icon

Android / Guides / Custom sticky note icon picker

Customize the sticky note icon picker

This guide requires an SVG to PDF conversion tool to create the PDF file containing your custom sticky note icons.

Add customized sticky note icons

In this guide, we'll add a new Right Arrow icon to the sticky note icon picker. The source code for this sample can be found at our Apryse Android Samples GitHub repository.

StickyNoteIcon
  1. First create a PDF file called stickynote_icons.pdf containing your icons. Each page of the PDF will contain a vector icon and a page label that we'll use as a reference later.

    Using the existing default file stickynote_icons.pdf, we'll add a new page containing our custom vector icon and give it a page label called RightArrow. For reference, get the resulting stickynote_icons.pdf file.

    Afterwards, add this to the /res/raw folder in your Android project.

You can modify the page labels in a PDF file using the Apryse SDK. Find more in this sample code .
  1. Now create two Android drawables of our custom icon, one for the fill color and the other one for the border. These will be used for the UI buttons in the icon picker. The drawables will be named as follows:

    • Create an icon drawable with a white fill color. Name the drawable file with your custom icon's page label prefixed with annotation_note_icon_ and suffixed with _fill.

      For example. annotation_note_icon_rightarrow_fill.xml.

    • Create another icon drawable with outline only. Name the drawable file with your custom icon's page label prefixed with annotation_note_icon_ and suffixed with _outline.

      For example annotation_note_icon_rightarrow_outline.xml.

    Add these two to the /res/drawable folder in your Android project

  2. Finally add a string array to /res/arrays.xml called stickynote_icons that references the page labels in stickynote_icons.pdf. This list defines the available icons in the sticky note icon picker.

    <string-array name="stickynote_icons">
        <!-- Add some default icons -->
        <item>Comment</item>
        <item>Help</item>
        <item>InsertCaret</item>
        <item>Star</item>
        <item>LightBulb</item>
        <item>NewParagraph</item>
        <item>CrossMark</item>
        <item>CheckMark</item>
        <item>LocationPin</item>
        <item>ThumbsUp</item>
        <!-- Add our custom icon -->
        <item>RightArrow</item>
    </string-array>

    You can reorder, add, or remove items from this string array to further customize your sticky note icon picker.

Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales