Android: Evaluate EditText after the user finishes editing

前端 未结 4 1580
[愿得一人]
[愿得一人] 2020-12-18 08:17

What I want I have an EditText, where the user can enter a value, such as 10.40. Once the user is done editing I am formatting his input to a currency, for

4条回答
  •  温柔的废话
    2020-12-18 08:43

    Try using both View.setFocusableInTouchMode() and View.requestFocus(). You can use the onKeyListener() interface to detect user input and start a timer after each onKey Event to start your edit after reasonable delay.

提交回复
热议问题