3

I am trying to port the android application(2.3.3) to BB 10,Presently input=number,is not showing numeric keypad,even though it filters appropriately,I tried list of methods to make it programmatically work or make some modifications in XML.

While modifying xml file, I was able to get the password=true,it filters numeric keypad on top of the other keypads, but still unable to figure out for some other non password keypads as well.

Similarly I tried modifying password as well setting programmatically, but none of these worked, below is the list of things that I tried programmatically, but none of them served my purpose.

  myNumber= (EditText) findViewById(R.id.ActivateNewUser_myNumber);
  myNumber.setInputType(InputType.TYPE_CLASS_NUMBER);
  myNumber.setRawInputType(Configuration.KEYBOARD_12KEY);
  myNumber.setKeyListener(new DigitsKeyListener());
  myNumber.setOnClickListener(this);
  myNumber.setTransformationMethod(PasswordTransformationMethod.getInstance());
  myNumber.setTransformationMethod(null);
  myNumber.setInputType(InputType.TYPE_CLASS_TEXT );
  myNumber.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
  myNumber.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
  myNumber.setInputType(InputType.TYPE_CLASS_TEXT | inputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
  myNumber.requestFocus();
  InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
  imm.showSoftInput(myNumber, InputMethodManager.SHOW_IMPLICIT);

Please, let me know, if I am missing something.

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.