Some test text!

platform
search

Quick menu

Contents

Quick menu events
Hide quick menu items
ToolMode icon mapping table
Disable quick menu
This tutorial only applies to Xamarin.Android.

QuickMenu is a convenient annotation popup menu that appears when a user long-presses on a blank space or on text contained in a PDFViewCtrl. It extends RelativeLayout and is a child view of PDFViewCtrl.

ActionMenu
Long-press on blank space
Long-press on text
To learn more about each icon, see the icon cheat sheet.
To learn how to customize the quick menu, see the customize quick menu guide.

linkQuick menu events

A number of events may be raised when a user interacts with the quick menu. For example, events will be raised when the quick menu is shown, dismissed, or when a quick menu item is clicked. .

If your activity is using PdfViewCtrlTabHostFragment for viewing PDF files, you can set your listener by calling:

mPdfViewCtrlTabHostFragment.CurrentPdfViewCtrlFragment.QuickMenuClicked += (sender, e) =>
{
    // Handle click event...
}

mPdfViewCtrlTabHostFragment.CurrentPdfViewCtrlFragment.QuickMenuShown += (sender, e) =>
{
    // Called when the quick menu is shown
}

mPdfViewCtrlTabHostFragment.CurrentPdfViewCtrlFragment.QuickMenuDismissed += (sender, e) =>
{
    // Called when the quick menu is dismissed
}

Or you can register the listener using the ToolManager:

mToolManager.QuickMenuClicked += (sender, e) =>
{
    // Handle click event...
}

mToolManager.QuickMenuShown += (sender, e) =>
{
    // Called when the quick menu is shown
}

mToolManager.QuickMenuDismissed += (sender, e) =>
{
    // Called when the quick menu is dismissed
}

linkHide quick menu items

If there are tools that you would like to remove from the quick menu, you can hide them by calling ToolManager.DisableToolMode:

mToolManager.DisableToolMode(new ToolManager.ToolMode[] {
    ToolManager.ToolMode.TextSquiggly,
    ToolManager.ToolMode.TextStrikeout
});

Then, when you long-press on text you will see:

linkToolMode icon mapping table

IconToolMode
RECT_CREATE
OVAL_CREATE
POLYLINE_CREATE
POLYGON_CREATE
CLOUD_CREATE
LINE_CREATE
ARROW_CREATE
RULER_CREATE
TEXT_CREATE
CALLOUT_CREATE
TEXT_ANNOT_CREATE
INK_CREATE
INK_ERASER
SIGNATURE
STAMPER
RUBBER_STAMPER
FREE_HIGHLIGHTER
TEXT_HIGHLIGHT
TEXT_UNDERLINE
TEXT_SQUIGGLY
TEXT_STRIKEOUT
SOUND_CREATE
FILE_ATTACHMENT_CREATE
FORM_TEXT_FIELD_CREATE
FORM_CHECKBOX_CREATE
ANNOT_EDIT_RECT_GROUP

linkDisable quick menu

If you would like to hide the long press quick menu entirely, you can do so by calling ToolManager.SetDisableQuickMenu. For example:

mToolManager.SetDisableQuickMenu(true);

Get the anwsers you need: Support

Contents

Quick menu events
Hide quick menu items
ToolMode icon mapping table
Disable quick menu