ime

Android - Unsupported Service: audio

大憨熊 提交于 2019-11-30 17:42:19
I am trying to understand and resolve and error I am seeing in the Eclipse workspace log while working on an Android app that implements an IME. I am new to Android and Eclipse. The error is "com.utterkaos.keyboard.LatinKeyboardView failed to instantiate." The associated stack trace is: java.lang.UnsupportedOperationException: Unsupported Service: audio at com.android.layoutlib.bridge.android.BridgeContext.getSystemService(BridgeContext.java:434) at android.inputmethodservice.KeyboardView.(KeyboardView.java:376) at android.inputmethodservice.KeyboardView.(KeyboardView.java:279) at com

Android IME: showing a custom pop-up dialog (like Swype keyboard) which can enter text into the TextView

落花浮王杯 提交于 2019-11-30 14:43:58
I'm wondering how I can create a custom pop-up like the one in the screenshot below (borrowed from the Swype keyboard), where I can have a couple of buttons, which each commit a string to the currently "connected" TextView (via a InputConnection ). Please note: this is an InputMethodService and not an ordinary Activity . I already tried launching a separate Activity with Theme:Dialog . However, as soon as that one opens I lose my focus with the TextView and my keyboard disappears (and with that my InputConnection is gone). You can try using a PopupWindow . You'll have to do a bit of hacking to

Putting IME in a custom text box, derived from Control

心不动则不痛 提交于 2019-11-30 13:21:57
问题 I have created my own single-line textbox control in C# .net 3.5 I've written this completely from scratch, including my own selection code, scrolling, copy/paste etc. It can even select left-to-right text, not that I'd ever use that... The problem I'm having is with IME (input method editor) integration. The IME does work to an extent, but I have a few problems. I'll just list one of them here. Normally, using a TextBox, the IME construction is rendered inside the TextBox. However, in my

C# and IME - getting the current input text

点点圈 提交于 2019-11-30 08:42:34
问题 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

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

荒凉一梦 提交于 2019-11-30 04:51:07
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 messenger apps. I can achieve it with this line: android:inputType="textMultiLine" The problem is that

Android IME: showing a custom pop-up dialog (like Swype keyboard) which can enter text into the TextView

試著忘記壹切 提交于 2019-11-29 22:25:38
问题 I'm wondering how I can create a custom pop-up like the one in the screenshot below (borrowed from the Swype keyboard), where I can have a couple of buttons, which each commit a string to the currently "connected" TextView (via a InputConnection). Please note: this is an InputMethodService and not an ordinary Activity . I already tried launching a separate Activity with Theme:Dialog . However, as soon as that one opens I lose my focus with the TextView and my keyboard disappears (and with

View-specific IME?

我怕爱的太早我们不能终老 提交于 2019-11-29 11:55:38
I have a custom view for which I want the user to be able to enter characters from an app-defined set of characters. To do this, as I understand it, I need to write an input method service. The user not only needs to install it, but then needs to enable the IME in the Settings > Language & keyboard, and then select the custom IME for use in the view. This seems really crazy. I want this IME to be used for just one view in one application. I don't want it to be available system-wide or force the user to make global setting changes. The only alternative I can see is defining my own in-app custom

Android setOnEditorActionListener() doesn't fire

拜拜、爱过 提交于 2019-11-29 09:31:19
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(TextView v, int actionId, KeyEvent event) { Log.d("TEST RESPONSE", "Action ID = " + actionId + "KeyEvent = "

Need number only soft keyboard?

Deadly 提交于 2019-11-29 09:29:13
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: setRawInputType(Configuration.KEYBOARD_12KEY) shows a keyboard like this: Would appreciate any help. Thanks

Android: switch to a different IME programmatically

只愿长相守 提交于 2019-11-29 07:53:15
问题 http://developer.android.com/guide/topics/text/creating-input-method.html#GeneralDesign reads: Because multiple IMEs may be installed on the device, provide a way for the user to switch to a different IME directly from the input method UI. Let's assume I have the source of two input methods and can modify it. I want to let the user switch between them quickly and am ready to reserve a button for that. How do I "switch to a different IME directly from the input method UI"? 回答1: Switching to