In my app, I have an EditText
, with a button to change the keyboard input type. The code:
ToggleCambiarTeclado.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
if (ToggleCambiarTeclado.isChecked()) {
tipoDeTecladoActual = InputType.TYPE_CLASS_NUMBER;
imagenTeclado.setImageDrawable(getResources().getDrawable(R.drawable.keyboard_numeric));
} else {
tipoDeTecladoActual = InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
imagenTeclado.setImageDrawable(getResources().getDrawable(R.drawable.keyboard_querty));
}
editNumeroContador.setInputType(tipoDeTecladoActual);
}
});
It works perfectly in my phone...but my boss has a Samsung, and is not changing the keyboard type in his phone.
I have tried changing it to TYPE_TEXT_VARIATION_NORMAL
, TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
and YPE_CLASS_TEXT
, neither of them are working.
Anyone knows if this is a bug? Any known workaround?
Thank you.
EDIT:
Just realized my boss has TouchPal installed. If he changes the default keyboard to the standard it works perfectly...