How do you 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. I assume that this...

Move layouts up when soft keyboard is shown?

I have a few elements in a RelativeView with the align bottom attribute set, when the soft keyboard comes up the elements are hidden by the soft keyboard. I would like them to move up so that if...

Hide Soft Keyboard on Done Keypress in Android?

I'm struggling with the done button on the soft keyboard. I can't get the soft keyboard Done key press to hide the keyboard. From another button, it works perfectly...

How to hide soft keyboard on android after clicking outside EditText?

Ok everyone knows that to hide a keyboard you need to implement: InputMethodManager imm = (InputMethodManager)...

How to detect a layout resize?

Dianne Hackborn mentioned in a couple threads that you can detect when a layout as been resized, for example, when the soft keyboard opens or closes. Such a thread is this one......

How do I detect if software keyboard is visible on Android Device or not?

Is there a way in Android to detect if the software (a.k.a. "soft") keyboard is visible on screen?

How to show soft-keyboard when edittext is focused

I want to automatically show the soft-keyboard when an EditText is focused (if the device does not have a physical keyboard) and I have two problems: When my Activity is displayed, my EditText is...

How to hide the soft keyboard from inside a fragment?

I have a FragmentActivity using a ViewPager to serve several fragments. Each is a ListFragment with the following layout: <?xml version="1.0"...

How to enable both hardware and virtual keyboards on Android ice cream sandwich

I'm developping a stock management application with Django for a customer's company, and want to use an ice cream sandwich tablet as the end-user device. I use an USB barcode reader which works...

Android emulator doesn't take keyboard input - SDK tools rev 20

I've upgraded the SDK tools to revision 20 (from 18) and since the upgrade, the emulator doesn't seem to accept input from laptop's keyboard. But only using the emulator's own 'soft' keyboard...

Detect delete button in soft keyboard

I have two EditText (each only only accepts one character) and I want to handle both fields like I had only one. I'm using a TextWatcher to set the focus in the second one when the user writes a...

android spinner setfocus

This question seems to be asked so many times but after trying over 20 different ideas I still have an issue. I have an inflated dialog that consists of (from the top) 7 spinners followed by...

Android: How to push button above soft keyboard

I've got a "save" button which I want to push up together with the soft keyboard. So when the user clicks an EditText in my layout, then the button has to stay above the keyboard. Now the button...

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...

Android Keyboard hides EditText

When I try to write something in an EditText which is at the bottom of the screen, the soft keyboard hides the EditText. How can I resolve this issue? Below is my xml code. I'm using this in a...

Soft keyboard open and close listener in an activity in Android

I have an Activity where there are 5 EditTexts. When the user clicks on the first EditText, the soft keyboard opens to enter some value in it. I want to set some other View's visibility to Gone...

Android - AutoCompleteTextView not showing after setText is called

I'm having a weird issue with AutoCompleteTextView. I have a AutoCompleteTextView that shows suggestions of cities when typing in it. The list of cities is retrieved from a remote server via JSON....

Android XML - EditText word-wrapping without newlines

I have this stupid and seemingly trivial problem with the properties of an EditText. The properties I am trying to achieve for the EditText, are the following: The contents of the view should NOT...

dialog - The specified child already has a parent. You must call removeView() on the child's parent first

After a check demanding the user to switch on internet services and I try to click on a button my app crashes with the error message java.lang.IllegalStateException: The specified child already...

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...

Enter "Enter key" in Appium Testing

How to send/press Enter key from soft keyboard in Appium in Android Automation testing? I tried several options, but none of them are working - instead of pressing the key, they are clearing the...

How to hide soft input keyboard on flutter after clicking outside TextField/anywhere on screen?

Currently, I know the method of hiding the soft keyboard using this code, by onTap methods of any widget. FocusScope.of(context).requestFocus(new FocusNode()); But I want to hide the soft...

Detecting backspace on an empty EditText

I'm trying to detect a soft keyboard backspace in an empty EditText view. I've searched Stack Overflow and also Google and ~20 similar questions, but none have a solution for detecting a backspace...

RecyclerView changes its scroll position when inside a ConstraintLayout

I encountered an issue with RecyclerView when it is a child of a ConstraintLayout. Originally, the RecyclerView was somewhere deep in the view hierarchy of Relative-, Frame- and LinearLeayouts,...

How to detect the OS / Peripherals with Kivy?

I'm writing a program with Kivy. Under "desktop" OSes it would be normal to use the keyboard for input, and my code does so. class ProgLayout( FloatLayout ): def __init__(self, **kwargs): ...

Flutter TextFormField disable keyboard but allow accept input

I am writing a scanner app where the app will be installed on a Scanner that runs Android. Inside the app there is a TextFormField waiting the input scan or paste in the text inside to do other...

Jetpack compose LazyColumn or Scrollable Column and IME padding for TextField doesn't work

I am trying to set a list if text fields, and when user set the focus on one text field at the bottom I expect that the user can see the appearing IME soft keyboard and the text field being padded...

Flutter: How to put focus to an autocomplete field?

how to put focus to the autocomplete field like it is correctly working with a standard TextField? Following example can be directly started. Activating edit focuses TextField and opens...

How to handle null safety for File in flutter?

I am working with Firebase and I have submitForm method like this: // File variable declaration File? _userImageFile; void _submitForm() { try { final isVaild =...

React native: Android soft keyboard push the View up

I have made one custom animated bottom sheet. It has two snap points. It starts top of the screen, if scroll the Animated card down it will come middle of the screen , again scroll down the card...