Orbit
Orbit

Reputation: 2395

EditText cursor slightly overlaps hint

Our designer noticed that our cursor slightly overlaps the hint text of an EditText:

Overlapping cursor

Upon investigation, we found this appears to be the default behavior for whatever reason, and is even present in other applications:

Slack:

Slack message input

Gmail (slightly less noticeable due to the dark colors):

Gmail search input

Additionally, I spun up a brand to test application with a single EditText, and further confirmed that the overlap seems to be default behavior. How can this overlap be fixed or mitigated? Adding paddingStart to the EditText doesn't work, as it moves the whole input area, including the cursor. There appears to be no official documentation about this.

The following is what we'd like to achieve regarding the cursor position:

cursor position

Upvotes: 1

Views: 22

Answers (0)

Related Questions