---
title: "Enable annotation inspector on Android | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/android/annotations/annotation-inspector/"
md_url: "https://www.nutrient.io/guides/android/annotations/annotation-inspector.md"
last_updated: "2026-05-25T18:42:17.667Z"
description: "The annotation inspector is a Nutrient user interface (UI) component that allows editing of annotation properties. It’s integrated."
---

# Enabling the annotation inspector on Android

The annotation inspector is a Nutrient user interface (UI) component that allows editing of annotation properties. It’s integrated with the [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html) and it’s displayed when a user selects the annotation properties picker from the annotation creation or editing toolbars.

## Controlling whether or not the annotation inspector is enabled

You can control whether or not the annotation inspector is enabled in [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html) via the [`#setAnnotationInspectorEnabled`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.configuration.activity/-pdf-activity-configuration/-builder/set-annotation-inspector-enabled.html) method in [`PdfActivityConfiguration.Builder`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.configuration.activity/-pdf-activity-configuration/-builder/index.html). When the annotation inspector is disabled, the annotation picker icon is hidden from toolbars.

## Controlling which annotation properties are available in the annotation inspector

To control the set of properties shown by the annotation inspector for each annotation type, your [custom annotation configuration](https://www.nutrient.io/../../annotations/annotation-configuration) needs to do two things:

1. Based on the property type, annotation configuration has to implement the respective interface extending [`AnnotationConfiguration`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.annotations.configuration/-annotation-configuration/index.html).

2. The [`#getSupportedProperties()`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.annotations.configuration/-annotation-configuration/get-supported-properties.html) method from the configuration must return the set of properties that should be shown in the inspector.

For example, to enable editing of the annotation color property, supported properties must be set to [`AnnotationProperty#COLOR`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.annotations.configuration/-annotation-property/index.html), and the configuration must implement [`AnnotationColorConfiguration`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.annotations.configuration/-annotation-color-configuration/index.html):

### KOTLIN

```kotlin

fragment.annotationConfiguration().put(
   AnnotationType.FREETEXT,
   FreeTextAnnotationConfiguration(context)
      // Free text annotations support color and text size properties.
      // This will disable the text size property in the annotation inspector..setSupportedProperties(EnumSet.of(AnnotationProperty.COLOR)).build()
)

```

### JAVA

```java

getPdfFragment().getAnnotationConfiguration().put(
   AnnotationType.FREETEXT,
   FreeTextAnnotationConfiguration(context)
      // Free text annotations support color and text size properties.
      // This will disable the text size property in the annotation inspector..setSupportedProperties(EnumSet.of(AnnotationProperty.COLOR)).build()
);

```

## Custom annotation inspector UI

[`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html) uses [`AnnotatingInspectorController`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui.inspector.annotation/-annotating-inspector-controller/index.html) for both creating and editing annotations. Replacing the built-in annotation inspector UI with a custom implementation is simple. All you need to do is provide an implementation of [`AnnotatingInspectorController`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui.inspector.annotation/-annotating-inspector-controller/index.html) to [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html) via [`#setCreationInspectorController()`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-ui/set-creation-inspector-controller.html) and [`#setEditingInspectorController()`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-ui/set-editing-inspector-controller.html).

If you don’t need to create the entire UI from scratch, you can extend the ready-to-use inspector controller, [`DefaultAnnotatingInspectorController`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui.inspector.annotation/-default-annotating-inspector-controller/index.html).

See `CustomAnnotationInspectorExample` from the Catalog app for a complete overview of how to create a custom annotation inspector UI.

## Using the annotation inspector with a custom activity or layout

If you’re using a custom layout in [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html), you need to provide [`PropertyInspectorCoordinatorLayout`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui.inspector/-property-inspector-coordinator-layout/index.html) with the ID `@id/pspdf__inspector_coordinator` in order to be able to use the annotation inspector. See the [Custom Activity Layouts](https://www.nutrient.io/../../customizing-the-interface/extending-pdfactivity/#custom-activity-layouts) section of the [Extending PdfActivity](https://www.nutrient.io/../../customizing-the-interface/extending-pdfactivity) guide article for more details.

If you’re using a custom activity built around [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/index.html), follow the [using property inspectors within fragment](https://www.nutrient.io/../../customizing-the-interface/using-inspectors-within-fragment) guide for information on how to manually integrate the annotation inspector. Alternatively, you can take a look at `ToolbarsInFragmentExample` from the Catalog app for a complete example of how to integrate contextual toolbars using the default annotation inspector in a custom activity using [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/index.html).

<!-- References -->

<!-- PdfActivity -->

<!-- Annotation configuration -->

<!-- Annotation inspector -->

<!-- Property Inspector -->

<!-- Control If Enabled -->
---

## Related pages

- [Enabling the form inspector on Android](/guides/android/user-interface/property-inspectors/form-inspector.md)
- [Using property inspectors within PdfFragment](/guides/android/customizing-the-interface/using-inspectors-within-fragment.md)

