How to calculate EditText value in Android?
In an Android app, I'm using two EditText controls and multiplying their two values. If one EditText is null and in the second one I put a value, it's not working properly. How can I deal with this case, in which I have a value in one EditText and a null in the other and I want to multiply the two values? First of all, you need to have a trigger for when to perform the calculation. Say it's a button, or, even better, every time the value of one of your EditText s changes: private EditText editText1, editText2; private TextView resultsText; ............................... // Obtains references