> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/reusable-content/customizequickmenu-overridemenu.md).

# customizeQuickMenu\_OverrideMenu

***

### Override menu resources

In this tutorial you will customize the quick menu for the `Pan` tool by overriding the default menu resource XML file in the Apryse SDK.

1. Create a menu resource XML file called `pan.xml` in your project's `Resources/menu` folder. This `pan.xml` file will automatically be used instead of the default one in the tools package. To override other quick menus, refer to the [table below](#quick-menu-resources) to determine the name of the menu resource file.
2. Add two items to you menu in `pan.xml` with the `id` attributes `@+id/qm_free_text` and `@+id/qm_floating_sig`:Here we use the ids `@+id/qm_free_text` and `@+id/qm_floating_sig` to override the `Free Text` and `Signature` menu items.Now, when you long-press on a blank space, you will see:

```xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/qm_free_text" android:title="@string/tools_qm_free_text" android:icon="@drawable/ic_annotation_freetext_black_24dp" />
    <item android:id="@+id/qm_floating_sig" android:title="@string/tools_qm_signature" android:icon="@drawable/ic_annotation_signature_black_24dp" />
</menu>
```

{% hint style="info" %}
You can also create your own menu items by providing a unique id, or by overriding our other menu items using the menu ids defined in the tools package. You can learn more about [handling custom menu item click events](#click-events).
{% endhint %}

<figure><img src="https://2401778818-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvUuF7dc8Zt8paqr2K3iP%2Fuploads%2Fgit-blob-8e31fdfc249cff65ba6cedcdc9410f2e1d68af10%2F4285295ec2f0d856fcb1a93e9376eba6368cafb6-363x231.png?alt=media" alt="" height="231"><figcaption></figcaption></figure>

#### Quick menu resources

| `pan`                    | Pan                 | Long press on blank space                                                                            |
| ------------------------ | ------------------- | ---------------------------------------------------------------------------------------------------- |
| `text_select`            | TextSelect          | Long press on text                                                                                   |
| `annot_simple_shape`     | AnnotEdit           | Single tap on Square, Circle, Line, Polygon, Polyline, Text                                          |
| `annot_free_text`        | AnnotEdit           | Single tap on FreeText                                                                               |
| `annot_link`             | AnnotEdit           | Single tap on Link                                                                                   |
| `annot_signature`        | AnnotEdit           | Single tap on signature (type: Annot.e\_Stamp and custom field: Signature.SIGNATURE\_ANNOTATION\_ID) |
| `annot_stamper`          | AnnotEdit           | Single tap on Stamp(type: Annot.e\_Stamp)                                                            |
| `annot_file_attachment`  | AnnotEdit           | Single tap on FileAttachment                                                                         |
| `annot_free_hand`        | AnnotEdit           | Single tap on Ink                                                                                    |
| `annot_general`          | AnnotEdit           | Single tap on all other annotation types                                                             |
| `annot_edit_text_markup` | AnnotEditTextMarkup | Single tap on TextMarkup annotations                                                                 |
| `type`                   | AnnotEditTextMarkup | Click quick menu item with id `R.id.type`                                                            |
| `sig_field_image`        | DigitalSignature    | Single tap on digital image signature                                                                |
| `annot_edit_thickness`   | DigitalSignature    | Click quick menu item with id `R.id.thickness`                                                       |
| `sig_field_paths`        | DigitalSignature    | Single tap on digital signature, or click on items in quick menu `R.menu.annot_edit_thickness`       |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/reusable-content/customizequickmenu-overridemenu.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
