Sitemap
Make Apps Simple

Working on ways to improve apps from planning, requirement gathering to end-user experience.

Follow publication

Jetpack Compose: Hiding TextField Cursor, Cursor Handle, and Text Toolbar

--

Let me start by explaining what these components are.

  • TextToolbar: The Toolbar which had the Copy & Cut options are called TextToolbar .
  • Cursor handle: The two drops at the bottom of the text are called Cursor handle .
  • Cursor : The black line that blinks till the text field is focused.

When we want to create a customized TextField , we might have requirements to remove/hide these.

Cursor

We can use cursorBrush property to change the cursor color to Transparent like this,

TextToolbar

For TextToolbar , we can use CompositionLocalProvider to change it from the default one.

Cursor Handle

For Curso handle also, we can make use of CompositionLocalProvider to change it from the default one.

Sample Code

Please comment with your valuable feedback. It would help me to improvise.

Kindly 👏👏👏 if this was useful.

Please follow if you would like to see more content related to Android Jetpack Compose.

LinkedIn: https://www.linkedin.com/in/abhimanyu-n/

--

--

Make Apps Simple
Make Apps Simple

Published in Make Apps Simple

Working on ways to improve apps from planning, requirement gathering to end-user experience.

Responses (1)