android-input-method

How to make delete key- delete all selected edit text in custom android keyboard

痞子三分冷 提交于 2019-12-10 23:06:03
问题 I am creating custom android keyboard and I want delete key to delete all the edit text if they are selected. i.e, when text is selected, clipboard(cut,copy,paste comes up); in that mode , if the delete key is pressed, it should delete all. It doesn't currently. P.S don't tell me for a specific edit text, it is a custom keyboard, it won't have access to edit text. 回答1: I don't see why it won't. In the keyboard, I created, I just send out the delete key event and it works like a charm. Try the

Android multiline number edittext

三世轮回 提交于 2019-12-10 22:30:33
问题 I want to create an EditText in Android which has several lines and number input. It is for the input of a matrix. I already have a solution to set android:inputType="textMultiLine" and then setRawInputType(Configuration.KEYBOARD_12KEY) . However, this does not work when editing the edittext in horizontal orientation and it also does not show the slash ( / ) which I need to input fractions. If I set the input type to setRawInputType(InputType.TYPE_CLASS_NUMBER) , it also does not work in

How to update extracted text in a custom editor view

旧街凉风 提交于 2019-12-10 11:54:50
问题 I've created a custom editor for vertical Mongolian text. The circled views show my my custom editor. They keyboards at the bottom are system keyboards. When a system keyboard inputs text into it in landscape orientation, though, the keyboard will likely show an extracted text view rather than my custom editor view. The circled view below is the extracted text view (which is not getting updated by my custom editor). I need to somehow send updates from my view to the input method manager. This

Change android input method for WebView

廉价感情. 提交于 2019-12-10 10:53:43
问题 I have a WebView that loads a webpage with a form and would like to use the most basic keyboard possible in order to conserve screen real estate if they are using the onscreen keyboard as their input method. I would also like to disable things like word suggestions in the onscreen keyboard. Is this possible? 回答1: You cannot change the input method, anywhere -- only users can change their input method. In terms of disabling search suggestions, I haven't seen any hooks to change that behavior

display built-in emoji keys for inputmethod

半世苍凉 提交于 2019-12-09 05:27:56
问题 I'm building a custom soft keyboard for android and would like to add a layout to include the emoji keys similar to what the default android keyboard (AOSP) is doing. I've searched around but it seems that most people are trying to display custom emoji from images. I'm looking to show the built-in icons that comes with Android (as shown below): It seems that I should be able to use the Unicode characters to send images from the keyboard, but my first attempt seems to generate only the older

Embedding emoji(emoticons images) to custom softkeyboard android

梦想与她 提交于 2019-12-07 13:35:34
问题 I have created a custom soft Keyboard(IME) where we can add custom emoji. Whenever i try to add my emoticons to it. it override the last text entered. i mean it dont append the emoticons unless it override it. how can i add emoji to currentInputConnection for example i image write hello image abcimage ///where image represents emoji it becomes i image write hello image image // and i can add image after space easily or i can repeatedly add images easily . when i add text it appends to emoji

input connection-how to delete selected text?

纵饮孤独 提交于 2019-12-07 11:37:40
问题 I made a custom keyboard for android. When I press backspace button of my keyboard I use getCurrentInputConnection().deleteSurroundingText(1, 0); to delete one letter from the input field. But when I select some text and then press the backspace button, the selected text is not deleted. What method in input connection should I use so that selected text is also deleted from my keyboard when I press the backspace button? 回答1: Call getCurrentInputConnection().commitText("",1); 回答2: When deleting

permission denied when I try to startService

孤街醉人 提交于 2019-12-07 08:45:44
问题 I am trying to access an InputMethodService from an Activity , and I am running into issues with the permissions. This is for a custom keyboard app. What I am trying to achieve is to bind the text, which is created in the Activity back into the InputMethodService . The Activity is opened from the InputMethodService , then from the Activity , I try to start the Service (which may be the issue. Here is how I open the Activity from the InputMethodService : @Override public void onStartInputView

Why android InputMethodManager.showSoftInput() returns false?

不打扰是莪最后的温柔 提交于 2019-12-07 00:39:29
问题 Recently while developing an app, I faced an issue. I have searched a lot on google but couldn't find any solution. In the end I came across this Android issue tracker To explain my issue, I have made a sample App. Basic Working of my Sample App I have a screen, which has an EditText, a Button and a RelativeLayout. Width and Height of RelativeLayout is 0px. It is just a view to move focus away from EditText. When App is launched focus is on RelativeLayout, not on EditText(so that there is not

Close/hide the Android Soft Keyboard on activity state onStop

我们两清 提交于 2019-12-06 23:24:07
问题 I have an EditText and a Button in my layout. After writing in the edit field and click this button to go back my fragment , I want to hide the virtual keyboard. I assume that there's a simple, but i tried some way and it not work: That code show how the Button work: private void onButtonClicked(){ getActivity().getSupportFragmentManager().popBackStack(); } That code for some solution but that can't help. This code i using hideSoftInputFromWindow but when i call 'EditText.getWindowToken()',