custom-keyboard

Custome keyboard show pop up image cut off

自古美人都是妖i 提交于 2019-12-11 12:44:49
问题 I am working in custom keyboard app. When long press in my emojis it's not open in above textField. it's display in bellow iMessage keyboard. see below screen shot. it's possible to add my image open in above textField.like iOS default emojis. if it's possible then give me solution, Thanks. 来源: https://stackoverflow.com/questions/37524059/custome-keyboard-show-pop-up-image-cut-off

How to commit composing text to an InputConnection when the user changes the selection

一曲冷凌霜 提交于 2019-12-11 07:33:07
问题 I am making a custom keyboard and have to set composing text before committing it. This is described in this Q&A. I know how to commit text in general inputConnection.commitText("text", 1); But I don't know how to commit it if the user changes the cursor location by touching another part of the EditText . From observing other keyboards I know it is possible because they do it. But in my keyboard if I have inputConnection.setComposingText("text", 1); and then change the cursor position, the

New Android keyboard behaving unexpectedly in certain apps

一曲冷凌霜 提交于 2019-12-11 05:24:29
问题 I am a linguist, not a programmer, sorry. I was asked and am adapting a keyboard for a minority language in Africa. I have spent a lot of time on this and am willing to learn more and to dig deeper. I am using the latest Android Studio in Windows 10 and am working from a code sample from Google here: https://android.googlesource.com/platform/development/+/master/samples/SoftKeyboard?autodive=0%2F I managed to adapt this sample to our local language and compile and install in a several

Long press delete key of a custom keyboard in swift

99封情书 提交于 2019-12-11 04:15:53
问题 I am making a custom keyboard. The delete key in the keyboard works fine for single tap. But it does not work for long press.I want to implement the long press on the delete key so that when the user holds down the delete button, the keyboard continuously deletes like in the standard ios keyboard. I referred to a couple of solutions on Stackoverflow, like- https://stackoverflow.com/a/26234876/6077720, https://stackoverflow.com/a/25633313/6077720, https://stackoverflow.com/a/30711421/6077720

Using UITextField inside a keyboard app extension

此生再无相见时 提交于 2019-12-10 20:07:52
问题 I added textfield (keyboardTextField) on top of my custom keyboard. I can select it and enter some text (using my custom keyboard). But it's impossible for me to select the input view of the main app back. This line of code [keyboardTextField resignFirstResponder]; doesn't work correctly. If someone have any workaround or any ideas, I need your help. 回答1: I fixed this by adding a button which switches the user input from the UILabel (in my case) to the (normal - iOS) UITextField in Messages f

IOS Customkeyboard getting wrong size in Landscape mode

断了今生、忘了曾经 提交于 2019-12-10 11:03:40
问题 I am working on custom keyboard. all works perfect but when i rotate the keyboard to landscape mode the keyboard load correctly but it takes the height of portrait mode keyboardview. Here is my Try: @interface KeyboardViewController () { CGFloat expandedHeight ; BOOL isPortrait; } @property(strong,nonatomic)keyboardLayout *ObjKeyLayout; - (void)updateViewConstraints { [super updateViewConstraints]; [self updateCustomHeight]; } -(void)updateCustomHeight { if (self.heightConstraint != nil) {

Communicate with Custom Keyboard extension with Host App not working in device but works in simulator

淺唱寂寞╮ 提交于 2019-12-09 20:08:34
问题 I am working with custom keyboard extension. that almost done but i just facing issue with device when i communicate data with extension and my host app that not woking in device but same thing this working in simulator. My code is following: HostApp View controller: - (void)viewDidLoad { _defaultvalue = [[NSUserDefaults alloc] initWithSuiteName:@"group.myapp.myappname.targetKeyboard"]; [_defaultvalue setBool:YES forKey:@"Layout"]; [_defaultvalue synchronize]; [super viewDidLoad]; // Do any

Setting keyPreviewLayout for android virtual keyboard is causing a crash

倖福魔咒の 提交于 2019-12-08 19:26:28
I have a custom virtual keyboard in android which appears when a button is clicked. If i set a keyPreviewLayout with the statement android:keyPreviewLayout="@layout/mykeypreviewlayout" and include some layout statements in res/layout/mykeypreviewlayout.xml at runtime, when a key on the custom soft keyboard is touched, the app crashes. Here are the code snippets: The following is from the main xml file. <LinearLayout android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_width="wrap_content"> <android.inputmethodservice.KeyboardView android:id="@+id/keyboardView"

How to clear emoji font cache in iOS application (keyboard extension)

筅森魡賤 提交于 2019-12-08 13:25:33
Keyboard extension in iOS is memory limited, when the memory cost is above 50+M, keyboard process will be killed. However, when I am developing the emoji panel in keyboard extension, the emoji panel has to render 800+ emoji icons. From this How to clear font cache filled with emoji characters? I know that, keyboad has to spend 10M memory for emoji rendering for the hundreds emoji icons. So I have two questions here: how the iOS system draw the emoji icons, why they have to be converted to png files and those memory is added to keyboard process, not the system(because I think it is a better

Detect whether custom keyboard is currently active from keyboard's container application

徘徊边缘 提交于 2019-12-08 10:47:00
问题 As part of my user on-boarding experience for a custom keyboard I'm developing, I'd like to know whether my custom keyboard is currently active for text entering from within the containing (parent) application. Is there any way to do this, similar to how you can discover whether the keyboard is installed? 回答1: After doing some further research, I have not yet found a way to accomplish this. But if anyone is in the same situation, here's a workaround I employed for the time being. 1. Detect