Questions tagged [android-keypad]

Android supports a variety of keyboard devices including special function keypads (volume and power controls), compact embedded QWERTY keyboards, and fully featured PC-style external keyboards.

In addition to the on-screen input methods, Android also supports hardware keyboards, so it's important that Android app optimize its user experience for interaction that might occur through an attached keyboard.

Useful links

451 questions
4
votes
2 answers

How to programmatically open Android soft keyboard according to the html input type in android webview

I want to show android soft keyboard on page load and programmatically focusing a input field. $('#field').focus(); As far as I researched , this cannot be done other than user generated events , like click event. So I tried a workaround to focus…
Hammad Shahid
  • 2,216
  • 5
  • 32
  • 60
4
votes
0 answers

Multiple inputTypes won't do numberSigned and numberDecimal simultaneously

For a few specific fields on my app the user needs to be able to enter a number that uses both decimals and negatives. However, the keyboard that shows up for the EditText now only shows the negative sign and no option for a decimal. This seems to…
4
votes
2 answers

Android EditText : How to avoid user enter smileys?

I would like to avoid to the user to put a smiley with the keyboard into an EditText. Is it possible ?
wawanopoulos
  • 9,614
  • 31
  • 111
  • 166
4
votes
3 answers

Android keyboard slides down leaving Black screen behind

I am using fragments in my application. There is scrollview in one of fragment containing many views. When user click on edittext, keyboard opens but when user click done button on keyboard then keyboard get hidden leaving black screen. I tried a…
4
votes
2 answers

Android: Dynamically close the virtual keypad though code?

How can you dynamically close the virtual keypad through code? All I want to do is close it when the user clicks an "Ok" button because it is not closing itself even though the button now has focus.
Tawani
  • 11,067
  • 20
  • 82
  • 106
4
votes
2 answers

How to get the '.' dot character KeyPressEvent on Android softkeyboard

Hi I'm trying to get the event when I press . (dot) in android keyboard public boolean onKey(View v, int keyCode, KeyEvent event) { if (keyCode == '.') { Log.d("dot pressed" "dot presed"); where I am getting wrong?
Suri
  • 61
  • 4
4
votes
2 answers

Disable DPAD keys in android

I am trying to catch events generated by the arrow keys (UP, DOWN, RIGHT and LEFT) and disable them. Below code snippet is from one of the activity class. @Override public boolean onKeyUp(int keyCode, KeyEvent event) { if(event.getAction() ==…
Renjith
  • 3,457
  • 5
  • 46
  • 67
4
votes
1 answer

how to open the key board inside layout in android

i need to open the keyboard inside my layout where i have an edittextbox see the image below in this image pink-header and footer brown-edittext blue-whole layout red-keyboard anyone help me to solve this. help me.
Poovizhirajan N
  • 1,263
  • 1
  • 13
  • 29
4
votes
3 answers

How to detect when Android software keyboard is hidden?

I need to detect when the android software keyboard is hidden. My activity currently responds to when the hardware keyboard is hidden but the software keyboard looks like it can only be implied through a size changed event. Does anyone know of a way…
Lee
  • 3,996
  • 3
  • 33
  • 37
3
votes
1 answer

Why is onKeyUp or onKeyDown not getting called for certain characters?

In my activity, I have an onKeyUp and onKeyDown event handlers, which are called for normal characters and even for some unicode characters like cedilla (ç). But not for others like á, à, ü, é, č, š, ž, è, ... Why is that? And how can I register…
miha
  • 3,287
  • 3
  • 29
  • 44
3
votes
1 answer

How to show the contents hidden by keyboard in the webview

My android application is a webview, and in first page there are 5 editboxes. When i enter some data in editbox the last editbox is hidden by keyboard. So i enclosed webview within a scrollview. But the scrolling is happening only on the first page…
Ron
  • 359
  • 6
  • 21
3
votes
2 answers

Include Word Suggestions in Android Keyboard

Hi I want to include word suggestions in my custom keyboard. e.g if I write wi it should suggest me whether you want to write "winner" "winks" "wilson" etc Please guide me. Thanks
John
  • 235
  • 1
  • 6
  • 17
3
votes
2 answers

showSoftInputFromInputMethod is deprecated Android P API 28

The showSoftInputFromInputMethod method from the InputMethodManager class is deprecated in Android P. As per the documentation, we should be using the InputMethodService.requestShowSelf(int) method for Android P and above. Now the question is how…
3
votes
1 answer

Android InputType password and InputType number not taking numbers

I am using MaterialEditText library. Though I tried removing the MaterialEditText library and using normal EditText also doesn't work. The issue is When I try to put inputType="textPassword" or inputType="number" or inputType="numberDecimal" my…
CodeGeek
  • 677
  • 2
  • 8
  • 22
3
votes
0 answers

Show GBoard number pad as default in android with option to switch to alphabetic keyboard in bottom left

I am trying to set the google keyboard number keypad as default but so far no luck. Below is the image where number pad also has an option to switch to ABC Keypad. Normally, when we want only characters or number then in inputType of editText we can…