The first activity, there are two edittext, one line edittext input barcode, another row edittext Enter the quantity of goods, finished goods bar code input, the focus automatically went edittext second row, and then click the event in the second row of edittext , go to the dial pad of a similar activity, that want to enter the number on the dial pad has an OK button, and then click the OK button on the first activity of the edittext focus automatically went on the first line. That is the next commodity barcode scanning, Great God, how you achieve it? The primary problem,<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
The first edittext listener TextWatcher, in determining whether a product code inside afterTextChange losers. If losers call
/ / Display the cursor
2edittext2.requestFocus ();
edittext2.setCursorVisible (true);
/ / Hide the cursor
1edittext1.clearFocus ();
edittext1.setCursorVisible (false);
The edittext2 cursor display and edittext1 cursor hidden.
In short, the set-up and can be used to hide the cursor on the code above. Behind the landlord should know how to do it
Reply:
My code used edittext1.setFocusableInTouchMode (true);
edittext1.requestFocus (); thank ncepu307
Green tea is still enthusiastic about your answer gave you points. Thank you
No comments:
Post a Comment