Questions tagged [android-softkeyboard]

The default onscreen input method provided by Android OS.

Android Soft Keyboard is the onscreen keyboard provided by Android OS.

Key Events of Android soft keyboard

On-screen Input Methods in Android Developers blog

2751 questions
144
votes
12 answers

Android on-screen keyboard auto popping up

One of my apps has an "opening screen" (basically a menu) that has an EditText followed by several Buttons. The problem is that several of my users are reporting that when they open the app it's automatically popping up the on-screen keyboard…
Jeremy Logan
  • 47,151
  • 38
  • 123
  • 143
133
votes
29 answers

Open soft keyboard programmatically

I have an activity with no child widgets for it and the corresponding xml file is,
Vignesh
  • 3,571
  • 6
  • 28
  • 44
125
votes
14 answers

when using AlertDialog.Builder with EditText, the Soft Keyboard doesn't pop

I am using AlertDialog.Builder in order to create an input box, with EditText as the input method. Unfortunately, the Soft Keyboard doesn't pop, although the EditText is in focus, unless you explicitly touch it again. Is there a way to force it to…
niros
  • 1,251
  • 2
  • 8
  • 4
111
votes
9 answers

How to remove auto focus/keyboard popup of a field when the screen shows up?

I have a screen where the first field is an EditText, and it gains the focus at startup, also popups the numeric input type, which is very annoying How can I make sure that when the activity is started the focus is not gained, and/or the input panel…
Pentium10
  • 204,586
  • 122
  • 423
  • 502
110
votes
18 answers

Close/hide the Android Soft Keyboard with Kotlin

I'm trying to write a simple Android app in Kotlin. I have an EditText and a Button in my layout. After writing in the edit field and clicking on the Button, I want to hide the virtual keyboard. There is a popular question Close/hide the Android…
Eugene Trifonov
  • 1,201
  • 2
  • 10
  • 7
101
votes
8 answers

Use "ENTER" key on softkeyboard instead of clicking button

Hello I've got a searched EditText and search Button. When I type the searched text, I'd like to use ENTER key on softkeyboard instead of search Button to activate search function. Thanks for help in advance.
peter.o
  • 3,460
  • 7
  • 51
  • 77
97
votes
19 answers

How to hide the soft keyboard inside a fragment?

I have a FragmentActivity using a ViewPager to serve several fragments. Each is a ListFragment with the following layout:
WilHall
  • 11,644
  • 6
  • 31
  • 53
95
votes
18 answers

Show entire bottom sheet with EditText above Keyboard

I'm implementing a UI where a bottom sheet will appear above the keyboard with an EditText for the user to enter a value. The problem is the View is being partially overlapped by the keyboard, covering up the bottom of the bottom sheet. Here is the…
advice
  • 5,778
  • 10
  • 33
  • 60
89
votes
17 answers

How to move the layout up when the soft keyboard is shown android

I have a login screen with two EditTexts and a login button in my layout. The problem is that, when I start typing, the soft keyboard is shown and covers the login button. How can I push the layout up or above the keyboard when it appears? I do not…
cavallo
  • 4,414
  • 9
  • 39
  • 61
89
votes
12 answers

Android: EditText in Dialog doesn't pull up soft keyboard

So I've got what seems to be a common problem, which is that the EditText in my dialog box doesn't show up when it gets focus. I've seen several workarounds, such as in this thread, this one and this one (and many more), but I have never seen a…
Paul
  • 10,381
  • 13
  • 48
  • 86
85
votes
5 answers

Is there any way to change android:windowSoftInputMode value from java class?

I want to act my tabs to have different windowSoftInputMode properties for each tab. How to access this property from java class when all handling of your tab is done from one single activity? Is there any way to access this manifest property from…
Prasham
  • 6,646
  • 8
  • 38
  • 55
85
votes
5 answers

Show soft keyboard for dialog

I am displaying a dialog with an edittext view. However, the softkeyboard will open only if the user presses inside the editview. So I tried calling an InputMethodManager with the following code. InputMethodManager imm = …
Rene
  • 3,746
  • 9
  • 29
  • 33
82
votes
5 answers

android: Softkeyboard perform action when Done key is pressed

I have an EditText. I want that after typing some text, when user presses the Done key of the softkeyboard, it should directly perform some search operation which I have also implemented in a button click event.
Khawar Raza
  • 15,870
  • 24
  • 70
  • 127
80
votes
14 answers

How can restrict my EditText input to some special character like backslash(/),tild(~) etc by soft keyboard in android programmatically

I am developing an application for keyboard, but i am geting an issue. I want to restrict/block some special character from soft keyboard in EditText in android programmatically. So, Is there any way I can restrict any special character input in…
Jagdish
  • 2,418
  • 4
  • 25
  • 51
79
votes
11 answers

Auto Collapse ActionBar SearchView on Soft Keyboard close

I am currently using an ActionBar menu item to display a SearchView in the action bar. When the search menu item is expanded the soft keyboard is displayed which is what I want. Now, when the user presses the back button to close the soft…
user1258568
  • 1,161
  • 1
  • 8
  • 7