Search code examples
androidandroid-edittextandroid-custom-view

Android - Custom EditText for Odometer Entry


I'm building am app that will allow Odometer entry. I would like to use the image shown below as the background on an EditText. Doing that is no problem, however I can not seem to get the digits entered into the text view to line up in the spaces of the image. I've tried adjusted the text size, font face, etc.

Here is the image I would like to use...

enter image description here

Does anyone have any suggestions on how I can accomplish this? So that when the user entered digits into the EditText, each digit goes into the correct "slot"?

thank you!!!


Solution

  • You can use android:letterSpacing? (only applies api 21 and over)