Android Softkeyboard insere o valor numérico no edittext muito lento
Eu tenho TableLayout, que contém o número de produtos. Cada linha contém código, descrição, quantidade, preço, valor do desconto, ..... Depende do usuário digitar quantidade, valor do desconto, quantidade do desconto e alguns outros valores também serão calculado
quando o usuário clicar no teclado virtual editText, este também estará ok, funcionando bem
Meu problema é quando o usuário pressiona as teclas numéricas muito lentamente para mostrar no EditTex
Por exemplo, pressione 3 no teclado, depois de 7 ou 8 segundos apenas é exibido nesse editText em particular.Como posso reduzir essa linha do tempo ...
Esta é a minha imagem de produto:
Por favor, alguém sugere por que isso está acontecend
Code assim:
for (int i = initil; i <end; i++) {
.............
............
final EditText txtQty = new EditText(this);
txtQty.setHeight(1);
txtQty.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, 42));
txtQty.setInputType(InputType.TYPE_CLASS_PHONE);
txtQty.setImeOptions(EditorInfo.IME_ACTION_DONE);
txtQty.setImeOptions(EditorInfo.IME_ACTION_NEXT);
txtQty.setSelectAllOnFocus(true);
txtQty.setTextSize(9);
txtQty.setHint("0.0");
// txtQty.setOnEditorActionListener(new DoneOnEditorActionListener());
// txtQty.setHighlightColor(R.color.green);
tr.addView(txtQty);
InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
mgr.showSoftInput(txtQty, InputMethodManager.SHOW_IMPLICIT);
mgr.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT,InputMethodManager.HIDE_IMPLICIT_ONLY);
((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(txtQty.getWindowToken(), 0);
txtQty.setOnEditorActionListener( new OnEditorActionListener() {
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
Log.i("KeyBoard" ,"Inside the Edit Text");
.............................
} });