---
title: "setMaxWidth | Mobile sdk | Mobile sdk android | Android"
description: "setMaxWidth"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# setMaxWidth

fun [setMaxWidth](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.annotations/-m-t-text-popup/set-max-width/)(maxWidth: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), mapViewController: [MTMapViewController](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.map/-m-t-map-view-controller/))

Sets the max width for the popup and updates it on the map.
