Not expert, but I think it is your logic
When one of the EditText gains Focus, the other loses it. So, when one of the events is triggered saying it got focus, the other also does (saying it lost focus).
At start, let's suppose we have ArtCDTxt focused (A)
If you click QtyTxt when the focus is on ArtCdTxt, two events occur
ArtCDTxt --> Loses focus (a)
QtyTxt --> Gains focus (B)
On the first event, you try to get it again, two new events are fired:
ArtCDTxt --> Gains focus (A)
QtyTxt --> Loses focus. (b)
So here everything would have to stop and the sequence would have to be:
AaBbA
But it seems as is the call to IME.ShowKeyBoard returns the focus again when ready, so the sequence follows aBbAaBba......
The question is: why do you want to return always the focus to the first EditText?