soft-keyboard

How to disable “Next” button on a EditText software keyboard (replace with “Done” button)

北慕城南 提交于 2019-11-26 12:08:05
问题 I have a bunch of EditTexts in my Android application, each with InputMethod set to numberSigned. My target device does not have a hardware keyboard and uses the software keyboard for numeric entry. Android replaces the standard \"Done\" button to the right of the entry box with a \"Next\" button. How can I use \"Done\" instead? 回答1: Try adding android:imeOptions="actionDone" to your EditText . Reference 回答2: This can also be accomplished in code with: myEditText.setImeOptions(EditorInfo.IME

How to get UIKeyboard size with iOS

旧城冷巷雨未停 提交于 2019-11-26 07:21:40
问题 Is there some way to get UIKeyboard size programmatically. 216.0f height and 162.0f height in landscape. Following seem to be deprecated. Is there some way that works without any warning in both 3.0 iPhone OS SDK and 4.0 iPhone OS SDK to do this.. CGSize keyBoardSize = [[[note userInfo] objectForKey:UIKeyboardBoundsUserInfoKey] CGRectValue].size; 回答1: You can get the keyboard size from the userInfo dictionary using the UIKeyboardFrameBeginUserInfoKey and the UIKeyboardFrameEndUserInfoKey

Creating a SoftKeyboard with Multiple/Alternate characters per key

大憨熊 提交于 2019-11-26 05:00:34
问题 I\'ve followed the examples on developer.android.com regarding Input Methods and played with the SoftKeyboard sample application. These together give more than enough information regarding the creation of simple keyboard. What I can\'t see in the API is the ability to create alternate / multiple characters per key which is available on the standard Keyboard (LatinIME Keyboard). The above image is the result of a long press on the \"a\" key. When you long press a key it\'s possible to populate

Programmatically Hide/Show Android Soft Keyboard [duplicate]

有些话、适合烂在心里 提交于 2019-11-26 02:56:16
Possible Duplicate: Close/hide the Android Soft Keyboard First thing first I already saw this thread. I tried accepted methods given there..But nothing worked for me.. I have two screens in my app. First one have 2 EditText's - One for username and one for password Second one have one ListView, and an EditText - to filter the listView In my first screen, I want username EditText to have focus on startup and Keyboard should be visible ..This is my implementation (simplified by removing unnecessary/unrelated codes).. app_login.xml <LinearLayout android:orientation="vertical" android:layout_width

Programmatically Hide/Show Android Soft Keyboard [duplicate]

感情迁移 提交于 2019-11-26 01:51:23
问题 Possible Duplicate: Close/hide the Android Soft Keyboard First thing first I already saw this thread. I tried accepted methods given there..But nothing worked for me.. I have two screens in my app. First one have 2 EditText\'s - One for username and one for password Second one have one ListView, and an EditText - to filter the listView In my first screen, I want username EditText to have focus on startup and Keyboard should be visible ..This is my implementation (simplified by removing

How to set visibility Android Soft Keyboard

邮差的信 提交于 2019-11-26 01:17:43
问题 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. I assume that this is a simple piece of code, but where can I find an example of it? 回答1: To help clarify this madness, I'd like to begin by apologizing on behalf of all Android users for Google's downright ridiculous treatment of the soft keyboard. The reason there are so many answers, each different, for the same simple question because this API,

Android: show soft keyboard automatically when focus is on an EditText

爷,独闯天下 提交于 2019-11-25 23:52:16
问题 I\'m showing an input box using AlertDialog . The EditText inside the dialog itself is automatically focused when I call AlertDialog.show() , but the soft keyboard is not automatically shown. How do I make the soft keyboard automatically show when the dialog is shown? (and there is no physical/hardware keyboard). Similar to how when I press the Search button to invoke the global search, the soft keyboard is automatically shown. 回答1: You can create a focus listener on the EditText on the