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


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(;

      myNumber.setKeyListener(new DigitsKeyListener());
      myNumber.setInputType(InputType.TYPE_CLASS_TEXT );
      myNumber.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
      InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
      imm.showSoftInput(myNumber, InputMethodManager.SHOW_IMPLICIT);
Posts: 38
Joined: Fri May 29, 2009 9:51 am


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests