custom-keyboard

Set composing text on an EditText from a custom keyboard in Android

旧巷老猫 提交于 2019-12-02 04:46:20
问题 Explanation of what I am trying to do I'm making a custom in-app keyboard that works on the same principle of this example. However, in my keyboard I'm using popup windows to display extra letter forms. In traditional Mongolian letters have different forms depending on if they are located at the beginning, middle, or end of a word. Usually these can be determined from the context, but sometimes a user needs to choose an alternate form explicitly from the popup key candidates. Lets say that a

Adding a minus sign to the UITextField's .NumberPad keyboard

送分小仙女□ 提交于 2019-12-02 04:27:32
Fairly new to iOS development so forgive me for asking something that might be quite obvious. As you all know the UITextField's keyboard with keyboardType set to .NumberPad looks like the following... .NumberPad keyboard What I would like to do is replace the empty space in the lower left corner with a minus sign. Is this possible or does one need to write an entire custom keyboard to achieve this? Would really appreciate the help. Add a toolbar to your textfield inputAccessoryView and when the textfield will become the responder then the keyboard will show the toolbar (Swift 3.0): func

iOS CoreBluetooth state unsupported when using in iOS custom keyboard

好久不见. 提交于 2019-12-02 04:16:43
I want to use CoreBluetooth API within iOS keyboard extension (custom keyboard). However, the state for the CBCentralManager is unsupported. The device I use is iPhone 6. It works fine inside the container app. Does this mean that the CoreBluetooth API cannot be used inside the keyboard extension? You will need to set RequestOpenAccess to YES in your extension's plist under NSExtension > NSExtensionAttributes. Setting this to YES allows the extension to access network resources. Bluetooth is considered a network resource so you will get CBManagerStateUnsupported when RequestOpenAccess is NO.

Custom keyboard height is more than default keybaord

会有一股神秘感。 提交于 2019-12-02 04:12:41
How to do the custom size of keyboard like what gBoard did in their keyboard (see the screenshot). Here the search section is showing above the keyboard. I want to do the same in my application. Is anybody can help me to know which method is using to create such a view. You should look at the inputAccessoryView property. Since it is a property on UIResponder , it is available on UITextView , UITextField and others. Assigning your custom view to inputAccessoryView will make it appear on top of the keyboard whenever the UI object you assigned it to has focus. // Create your custom keyboard

iOS 8.3 'UIView-Encapsulated-Layout-Width' in Custom Keyboard

 ̄綄美尐妖づ 提交于 2019-12-01 15:29:56
I have implemented a custom keyboard. It works fine on a device which runs iOS 8.2. However, when I run the same code on a device with iOS 8.3 I get the following warnings and the height of the keyboard is not set properly: Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the

How to add custom notification in iOS Custom Keyboard?

蹲街弑〆低调 提交于 2019-12-01 06:43:16
I have added Custom Keyboard extension inside my app and running perfect. I have added NSNotification in my keyboard extension class like this: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeKeyboardColor) name:@"keyboard_color" object:nil]; Now I am calling this notification from my view controller class like this: [[NSNotificationCenter defaultCenter] postNotificationName:@"keyboard_color" object:self]; Now I have added my notification selector method in my keyboard extension class like this: -(void)changeKeyboardColor{ } But it is not working. I am testing

How to detect if ios8 custom keyboard extension is running in not iphone 6 optimized app?

末鹿安然 提交于 2019-12-01 06:38:30
In the app that not optimized for iphone 6 in standard display mode keyboard and status bar shows zoomed. This causes my manually layouted custom keyboard extension to show streched. How can I detect this zooming to fix layout? Use self.view.frame.size.width It returns 320 for zoomed mode & 414 for regular mode on my 6+ (hopefully on 6 also) in - (void)updateViewConstraints Eventually you will not need to do this as whatsapp and other apps get updated (I believe whatsapp just did) but how I get around it temporarily is by getting the size of the view where I am drawing my keyboard view. CGRect

Gboard like search bar in Android IME

你。 提交于 2019-12-01 06:11:31
I want to create a search bar like Gboard inside keyboard (Android IME) as shown in picture. Gboard Sample : I have implemented an edittext on Keyboardview.xml as shown in picture. My Implementation : main_keyboard_frame.xml <RelativeLayout android:layout_width="match_parent" android:layout_height="120dp" android:background="#cf060610" android:id="@+id/search_panel" android:visibility="invisible"> <EditText android:layout_width="match_parent" android:layout_height="40dp" android:hint="sdsddsd" android:id="@+id/ed"/> </RelativeLayout> But the problem is when i press the edittext 2 (that is

ios 8 custom keyboard hold button to delete?

南笙酒味 提交于 2019-12-01 05:57:34
I am currently building a custom keyboard and I am almost done. One problem that I have is with the delete button. When the user taps the delete button, it does what it should do and deletes the previous text entry. However when the user holds the button down, nothing happens. How do I make it so that when the user holds down the delete button, the keyboard continuously deletes like in the standard ios keyboard? This is my current code: pragma mark Keyboards - (void)addGesturesToKeyboard{ [self.keyboard.deleteKey addTarget:self action:@selector(pressDeleteKey)forControlEvents

Gboard like search bar in Android IME

空扰寡人 提交于 2019-12-01 05:26:18
问题 I want to create a search bar like Gboard inside keyboard (Android IME) as shown in picture. Gboard Sample : I have implemented an edittext on Keyboardview.xml as shown in picture. My Implementation : main_keyboard_frame.xml <RelativeLayout android:layout_width="match_parent" android:layout_height="120dp" android:background="#cf060610" android:id="@+id/search_panel" android:visibility="invisible"> <EditText android:layout_width="match_parent" android:layout_height="40dp" android:hint="sdsddsd