---
title: "Styling the document title independently from the main toolbar"
canonical_url: "https://www.nutrient.io/guides/android/prebuilt-solutions/common-use-cases/document-title-styling/"
md_url: "https://www.nutrient.io/guides/android/prebuilt-solutions/common-use-cases/document-title-styling.md"
last_updated: "2026-06-08T19:21:59.108Z"
description: "Shows how to style the document title and background independently from the main toolbar."
---

By design, the document title overlay and the main toolbar share the same `pspdf__backgroundColor` from `pspdf__mainToolbarStyle`. There is currently no dedicated style attribute to set them independently via XML.

To set a different background or text color on the title overlay, access it programmatically after `onCreate` via [`PSPDFKitViews#getDocumentTitleOverlayView`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-p-s-p-d-f-kit-views/get-document-title-overlay-view.html), and set the background color and text color directly on the `DocumentTitleOverlayView`:

### KOTLIN

```kotlin

pspdfKitViews.documentTitleOverlayView?.apply {
    setBackgroundColor(ContextCompat.getColor(context, R.color.your_title_background))
    setTextColor(ContextCompat.getColor(context, R.color.your_title_text_color))
}

```

To hide the title overlay entirely, use [`PdfActivityConfiguration.Builder`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.configuration.activity/-pdf-activity-configuration/-builder/index.html):

### KOTLIN

```kotlin

val configuration = PdfActivityConfiguration.Builder(context).hideDocumentTitleOverlay().build()

```
---

## Related pages

- [Changing Configuration At Runtime](/guides/android/customizing-the-interface/changing-configuration-at-runtime.md)
- [Document Sharing](/guides/android/miscellaneous/document-sharing.md)
- [Text Markup Annotations](/guides/android/annotations/text-markup-annotations.md)
- [Retrieving Highlighted Text](/guides/android/prebuilt-solutions/common-use-cases/retrieving-highlighted-text.md)

