How to programmatically show numeric keypad in application

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

How to programmatically show numeric keypad in application

Postby rakesh86shankar » Tue Mar 05, 2013 5:11 pm

Hi,

I am trying to port the android application 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 modification in xml file,i was able to get the password=true,it filters numeric keypad on top of the other keypads,Stil not able to figure out for someother non password keypads as well ,

Similarly i tried modifcation in password as well setting programmatically,but none of things worked,I will be listing below the list of things that i tried to do programmatically which was were unsuccessful.If I am missing any of new methods just let me know


Code: Select all
      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);
rakesh86shankar
Developer
Developer
 
Posts: 38
Joined: Fri May 29, 2009 9:51 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests