Tengo TableLayout, que contiene una cantidad de productos.Cada fila contiene código, cantidad de descripción, precio, valor de descuento, ..... Depende del usuario ingrese la cantidad, valor de descuento , cantidad de descuento & algunos otros valores también se calcularán.Android Softkeyboard ingrese el valor numérico en edittext muy lento
cuando el usuario haga clic en el teclado en pantalla EDITTEXT vendrá éste también está bien, trabajando bien
Mi problema es cuando el usuario pulsa las teclas numéricas muy lenta para mostrar en el EditarTexto.
Por ejemplo, he de prensa 3 de teclado, después de 7 u 8 segundos solamente se muestran en ese editText.How particular, puedo reducir esta línea de tiempo ...
Ésta es mi imagen del producto:
¿Alguien sugiere por qué sucede esto?
código como este:
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");
.............................
} });
verificar con filas reductoras en la tabla de rectas, ...... – viv
¿Ha comprobado en el dispositivo real ...? –
@Viv actualmente la primera página contiene 10 registros. No puedo reducir más porque algunos clientes tienen más de 400 registros. Entonces, si decalizamos el lado del ciclo, ¿es posible obtener el valor de las filas afuera? (Creo que no). Si declaramos afuera, entonces está bien. – Piraba