There is an input field. It is cleared as soon as I do the focus there - I start typing text. I click on the field, it is cleared and the keyboard appears. I click, click on the next element - everything is fine. BUT! If I click on the field again, it will be cleared, or there is such an enter or ok button on the keyboard. Pressing it will also clear the field ... How to make it clear only with the first click? Although I came up with a way, it is necessary to make an event when the focus is edited and write to a variable value that cleaning is possible, and if you click on the field, if cleaning = true , then clear.
etSum.setOnClickListener(this); .... case R.id.etSum: // Π΅ΡΠ»ΠΈ ΠΊΠ»ΠΈΠΊ ΠΏΠΎ ΠΏΠΎΠ»Ρ - ΡΠΈΡΡΠΈΠΌ! etSum.setText(""); Log.d(TAG, "ΠΊΠ»ΠΈΠΊ ΠΏΠΎ ΠΏΠΎΠ»Ρ - ΡΠΈΡΡΠΊΠ°"); So the question is how to make events when the focus is lost (input is completed) ... or that the field is cleared only with one click on the field ...