Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-13 UTC.
[null,null,["Last updated 2025-08-13 UTC."],[],[],null,["# TextContextMenuSession\n======================\n\nArtifact: [androidx.compose.foundation:foundation](/jetpack/androidx/releases/compose-foundation) \n[View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/text/contextmenu/data/TextContextMenuData.kt+class:androidx.compose.foundation.text.contextmenu.data.TextContextMenuSession) \nAdded in [1.9.0](/jetpack/androidx/releases/compose-foundation#1.9.0)\nCommon/AllAndroid/JVM\n - Cmn \n\n ```\n interface TextContextMenuSession\n ```\n\n*** ** * ** ***\n\nA session for an open text context menu that can be used to close the context menu.\n\nSummary\n-------\n\n| ### Public functions |\n|-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|-----|\n| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [close](/reference/kotlin/androidx/compose/foundation/text/contextmenu/data/TextContextMenuSession#close())`()` Closes the text context menu. | Cmn |\n\nPublic functions\n----------------\n\n### close\n\nCmn \nAdded in [1.9.0](/jetpack/androidx/releases/compose-foundation#1.9.0) \n\n```\nfun close(): Unit\n```\n\nCloses the text context menu."]]