Android Question EditText TextChanged

solfinker

Member
Licensed User
Longtime User
Hello!

Every time the EditText field (Decimal_numbers) is modified, the corresponding Sub is executed. So far so god.
But since I am using it to execute some calculations, I get en error whenever the field is empty.
So I would need to perform the calculations only when the field is finally edited - when pressing the "return" key on the numeric keyboard, or I suppose I'd need it make no calculations at all when the field is blank.

Thank you for your hints.

I have used the following code:
B4X:
If txtVolume.text = "" Then
txtVolume.text = "0"
End If
volume = txtVolume.text

but I suppose there will be sth more elegant
 
Last edited:
Top