How to show the numeric keypad
问题 I read several other posts and using input.setInputType(TYPE_NUMBER_FLAG_DECIMAL); does open the keyboard but its not the numeric keyboard Is there a trick to this? 回答1: give android:inputType="number" inside your xml file Edit: "Number" does not work, changed to "number" (lowercase N) 回答2: a) in xml android:numeric="decimal" b) in code EditText editView = new EditText(this); editView.setKeyListener(new DigitsKeyListener()); 回答3: In your xml, you have to do this: android:inputType="Number" In