Some test text!

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 PDFTron Android Samples GitHub repository.

  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 stickynote_icons.pdf (which can be found here), we'll add a new page containing our custom vector icon and give it a page label called RightArrow. For reference, the resulting stickynote_icons.pdf file can be found here.

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

You can modify the page labels in a PDF file using the PDFTron SDK. A sample can be found here .
  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 -->
        <!-- Add our custom icon -->

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

Get the answers you need: Support

Upcoming Webinar: Customer Experience and Retaining Control: Boosting Document Automation and Efficiency in Financial Services | Sept 15, 2022 at 11 am PT


The Platform


© 2022 PDFTron Systems Inc. All rights reserved.


Terms of Use