editbox lostfocus fires on the wrong edittext box
<p>I have a simple app with 2 edittext boxes. When input is typed into the 1st box one set of calculations are performed. If input is put into the other instead, a different set of calc's occurs.</p>

<p>So, if a number is typed into the first box etBox1, and the user leaves the box, the data from the first box is used to calculate a reesult and put it into the second box. If a number is typed into the second box etBox2, the data is used to calculate a value for the first box.</p>

<p>I tried:</p>

<pre><code>final EditText etBox1 = (EditText) findViewById(R.id.etBox1) 
final EditText etBox2 = (EditText) findViewById(R.id.etBox2)

etBox1.setOnFocusChangeListener(new View.OnFocusChangeListener()
{ 
   @override
   public void onFocusChange(View v, boolean lostfocus)
   {
       if (lostFocus == true)
       { //do my calculations....}
</code></pre>

<p>This fires when the focus given to etBox1 instead of waiting for the box to loose focus. This crashes the app because the user hasn't had the chance to input a number into the box. Any ideas why this behaves as a "hasFocus" instead of a "lostFocus"? There is no documentation available on lostFocus at Android's site.</p>
