0

How can I implement the following input behaviour using EditText in Android. Is there a existing library to implement this behaviour or if else, what would the logic be like? This behaviour can be seen on ATM machines as well.

Here's a gif that demonstrates this behaviour in an Android app:

enter image description here

As observed, the input starts with the last digit and proceeds to the left while appending necessary commas and decimal separation (2 decimals). I couldn't find any library that implements this behaviour.

Can you point me in the right direction with an existing implementation or a library?

Dinuka Jay
  • 4,583
  • 6
  • 63
  • 132

1 Answers1

1

I resolved this and built a custom library based on Subhechhu Khanal's link to a resolved thread. Anyone who needs this behaviour can use the custom library and customise it as required.

ATM-EditText Library: https://github.com/dinukapj/ATM-EditText

I encourage the community to make this library better. Thanks!

Dinuka Jay
  • 4,583
  • 6
  • 63
  • 132