Linked Questions
27 questions linked to/from Android - Programmatically Hide/Show Soft Keyboard
4374 votes
132 answers
1.9m views
How can I close/hide the Android soft keyboard programmatically?
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 when touching outside the keyboard. Can someone provide a ...
-1 votes
1 answer
62 views
Keyboard is not Hiding [duplicate]
public static void hideKeyboard(Activity activity) { InputMethodManager imm = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE); View view = activity....
88 votes
6 answers
53k views
Android softkeyboard never shows up in emulator
I'm new to Android. I've spent two hours already for searching. Whatever i try softkeyboard is never shown for my EditText. I create it simply: EditText editText = (EditText)findViewById(R.id....
89 votes
7 answers
97k views
Android TextField : set focus + soft input programmatically
In my view, I have a search EditText and I would like to trigger programmatically the behaviour of a click event on the field, i.e give focus to the text field AND display soft keyboard if necessary (...
52 votes
10 answers
67k views
Show keyboard automatically
Please explain me the issue about soft keyboard. For example, I have an EditText on my activity or dialogfragment or fragmentactivity, whatever. here it is: <EditText android:id="@+id/edPswrd" ...
31 votes
7 answers
31k views
EditText automatically opens soft keyboard when Fragment is visible with ViewPager
I have a Fragment (the compatibility version) with an EditText in its layout. I'm using a ViewFlipper to flip between fragments. When I get to this particular Fragment, the soft keyboard opens up ...
12 votes
2 answers
9k views
Android:How do I force the soft keyboard to close when it has been forced to open?
I have an EditText in my Activity. As soon as the Activity starts I force the soft keyboard to open using. InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);...
10 votes
3 answers
5k views
Cannot hide Android soft keyboard even with inputmanager
Problem: I want to hide the keyboard when the button "Add" is pressed. There are two EditText on the screen. The keyboard doesn't appear at starting the activity, which is good, but it doesn't go ...
18 votes
5 answers
392 views
Hide softkeyboard for locker app
I'm trying to close the softkeyboard that is opened in another app. I tried every solution from here: Programmatically Hide/Show Android Soft Keyboard or here: Close/hide the Android Soft Keyboard As ...
4 votes
4 answers
11k views
Android : show keyboard in edittext
Am stuck with a pretty simple issue in the Android App am coding. I have a list of EditText objects, one in each row. When the user long presses the EditText, I need to show the keyboard. When the ...
2 votes
1 answer
5k views
How to automatically show soft keyboard on start?
I have an activity that only has a EditText. I want the soft keyboard to show up automatically. How can I do this?
6 votes
1 answer
3k views
Keyboard is not being hidden when AlertDialog is dismissed
I have extended AlertDialog with my class that displays my XML layout. I don't use AlertDialog's standard buttons, I have my own OK and Cancel buttons. Listener for them calls dismiss(). The problem ...
1 vote
4 answers
2k views
How to open input Keyboard on load of activity
I have an EditText in my activity class. What I want is, whenever my activity starts it automatically opens the input keyboard along with EditText. So how that can be done? Please anyone suggest it to ...
1 vote
4 answers
2k views
How to reset EditText back to editable state after setting textIsSelectable to true?
When my app starts, I loaded some text inside EditText which cannot be edited by the user, until click 'menu' and select 'edit text'. The initial xml looks like the below: <EditText android:id=...
1 vote
1 answer
2k views
Android KeyBoard doesn't show in AlertDialog
I have tried so many ways but I just can't get the display any Keyboard in my activity. Keyboard just doesn't show!!! I have button in my activity that when clicked calls the method below which ...