ime

C# and IME - getting the current input text

谁都会走 提交于 2019-11-29 07:33:04
I'm using the Japanese IME as an example but it is probably the same in other languages which use an IME for input. When the user types text into a textbox using the IME, the KeyDown and KeyUp events are fired. However the TextBox.Text property does not return the typed text until the user has validated the input in the IME using the Enter key. So for example if the user types 5 times あ then validates, I will get 5 keydown/keyup events, with each time TextBox.Text returning "" (the empty string) and at the end I will get a keydown/keyup for the enter key and the TextBox.Text will directly

How to implement Multiline EditText with ActionDone button (without Enter button)

我们两清 提交于 2019-11-29 02:21:11
问题 I have EditText which is used for entering contents on messages (emails, sms). I want message to be immediately posted on ActionDone button click. I use following code for this: message.setOnEditorActionListener((textView, i, keyEvent) -> { switch (i) { case EditorInfo.IME_ACTION_DONE: if (messageCanBePosted()) { SoftKeyboard.hide(message); postMessage(); return true; } else { return false; } default: return false; } }); But also I want this message field to be multiline, like in any other

Setting EditText imeOptions to actionNext has no effect

∥☆過路亽.° 提交于 2019-11-28 06:07:37
I have a fairly complex (not really) xml layout file. One of the views is a LinearLayout ( v1 ) with two children: an EditText( v2 ) and another LinearLayout( v3 ). The child LinearLayout in turn has an EditText( v4 ) and an ImageView( v5 ). For EditText v2 I have imeOptions as android:imeOptions="actionNext" But when I run the app, the keyboard's return does not check to next and I want it to change to next . How do I fix this problem? Also, when user clicks next, I want focus to go to EditText v4. I do I do this? For those who really need to see some code: <LinearLayout android:id="@+id/do

Android: Edit Text Go Button

你。 提交于 2019-11-28 04:37:42
I have an Edit Text that is defined as follows. <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:maxLines="1" android:inputType="text" android:hint="@string/field_text" android:id="@+id/field" /> I want to set a custom command so that when somebody clicks on the Done/Go button on the onscreen keyboard a button is clicked or just run the methods that are run by the button. I think this has something to do with ime options but I havent been able to figure out how they work. Thanks in advance for any help! Niall Sheridan You want a combination of android

Android setOnEditorActionListener() doesn't fire

北城以北 提交于 2019-11-28 03:02:07
问题 I'm trying to set a listener to EditText when enter button will be pressed.But it didn't fire at all. I tested this on LG Nexus 4 with Android 4.2.2. setOnEditorActionListener works on Amazon Kindle Fire with Android 2.3 and setImeActionLabel works nowhere! I also can't set text for Enter button.Here is code: mEditText.setImeActionLabel("Reply", EditorInfo.IME_ACTION_UNSPECIFIED); mEditText.setOnEditorActionListener(new OnEditorActionListener() { @Override public boolean onEditorAction

Need number only soft keyboard?

三世轮回 提交于 2019-11-28 02:57:59
问题 Hi I need a soft keyboard with only numeric values 0 to 9 and Enter key. Shouldn't show anything other than these like . , ( ) etc... I tried several options as suggested here but nothings seems to work for me. setRawInputType(Configuration.KEYBOARD_QWERTY) setRawInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED) setRawInputType(InputType.TYPE_CLASS_NUMBER) setRawInputType(InputType.TYPE_CLASS_PHONE) I always have the extra characters show up on the keyboard like:

Setting EditText imeOptions to actionNext has no effect

谁说胖子不能爱 提交于 2019-11-27 20:20:45
问题 I have a fairly complex (not really) xml layout file. One of the views is a LinearLayout ( v1 ) with two children: an EditText( v2 ) and another LinearLayout( v3 ). The child LinearLayout in turn has an EditText( v4 ) and an ImageView( v5 ). For EditText v2 I have imeOptions as android:imeOptions="actionNext" But when I run the app, the keyboard's return does not check to next and I want it to change to next . How do I fix this problem? Also, when user clicks next, I want focus to go to

How to determine the current IME in Android?

你说的曾经没有我的故事 提交于 2019-11-27 14:43:32
问题 I have an application where I would like to warn the user if they are not using the default Android softkeyboard. (i.e. they are using Swype or some thing else). How can I check which input method they currently have selected? 回答1: You can get a default IME, use: Settings.Secure.getString(getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD); 回答2: InputMethodManager has getEnabledInputMethodList() . You get an InputMethodManager from getSystemService() in your Activity . 回答3: Here's a

Android: Edit Text Go Button

て烟熏妆下的殇ゞ 提交于 2019-11-27 00:33:10
问题 I have an Edit Text that is defined as follows. <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:maxLines="1" android:inputType="text" android:hint="@string/field_text" android:id="@+id/field" /> I want to set a custom command so that when somebody clicks on the Done/Go button on the onscreen keyboard a button is clicked or just run the methods that are run by the button. I think this has something to do with ime options but I havent been able to

how do you use IME?

霸气de小男生 提交于 2019-11-26 19:16:07
问题 I want to make a control that handles user input, so I want to be able to handle different keyboards, and one of the ways is using IME. If you don't handle it, there is a floating window that appears when you have IME active (for example japanese writing active). I found the messages that needs to be taken care of, but I don't know how to send the keys I'm trapping to the IME and when do I get a valid converted char. 回答1: I'm a Microsoft SDE that used to maintain the (Windows and Office)