custom-keyboard

SwiftUI in target (custom keyboard)

本秂侑毒 提交于 2020-06-01 04:37:59
问题 Can't find any example of using SwiftUI in Keyboard Extension. I create an extension and trying to create simple SwiftUI Button with no action (it just prints debug text). But there is no visible button in Keyboard. Is it possible to create SwiftUI custom keyboard? struct SwiftUIButton: View{ let action: () -> () var body: some View{ Button(action: action){Text("Tap me")} } } class KeyboardViewController: UIInputViewController { @IBOutlet var nextKeyboardButton: UIButton! //1.insert this:

SwiftUI in target (custom keyboard)

笑着哭i 提交于 2020-06-01 04:36:06
问题 Can't find any example of using SwiftUI in Keyboard Extension. I create an extension and trying to create simple SwiftUI Button with no action (it just prints debug text). But there is no visible button in Keyboard. Is it possible to create SwiftUI custom keyboard? struct SwiftUIButton: View{ let action: () -> () var body: some View{ Button(action: action){Text("Tap me")} } } class KeyboardViewController: UIInputViewController { @IBOutlet var nextKeyboardButton: UIButton! //1.insert this:

PopupWindow getting clipped on custom keyboard for Android API 28

蓝咒 提交于 2020-02-01 00:41:09
问题 I made a custom keyboard. When you long press a key, a PopupWindow shows some extra choices above the key. The problem is that in API 28, this popup gets clipped (or even completely hidden for the top row). I had solved this problem for API < 28 with popupWindow.setClippingEnabled(false); However, with API 28 the problem has come back. Here is more of the code: private void layoutAndShowPopupWindow(Key key, int xPosition) { popupWindow = new PopupWindow(popupView, LinearLayout.LayoutParams

Error while running Custom Keyboard running on simulator Swift

蹲街弑〆低调 提交于 2020-01-15 05:18:10
问题 I am trying to make custom keyboard.For simple custom keyboard it is running fine, but while clicking on emoji it is showing below error : viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted} I have also tried running this with Device but still it is showing same error. Do anyone know what is the solution for it? 回答1: I encountered same issue like you. it's because of memory leak on simulator. and

Open phone settings when button is clicked in my app

自作多情 提交于 2020-01-13 11:36:22
问题 I recently upgraded to Xcode 8 and converted my code to Swift 3. I am making a custom keyboard (extension) which worked perfectly fine till iOS 9, but i am facing a couple of issues in iOS 10. The container app of the custom keyboard contains a button which directs the user to the keyboard settings to add the keyboard Issue: This button click is not working in iOS 10 i.e the user is not directed to the settings. I have configured the URL Schemes in my project and have tried the following code

Package name of current running application package name Android 6.0 [duplicate]

☆樱花仙子☆ 提交于 2020-01-11 14:43:06
问题 This question already has answers here : Android 6.0: Get package name of current activity [duplicate] (2 answers) Closed 4 years ago . I am using custom keyboard to share image to any app like Facebook,whatsApp and i want to know the current open application package name on onIteamClickListener of my custom keyboard to share data without chooser dialog. Below is my code grdPhoto.setOnItemClickListener(new AdapterView.OnItemClickListener() { @TargetApi(Build.VERSION_CODES.LOLLIPOP) @Override

Package name of current running application package name Android 6.0 [duplicate]

ⅰ亾dé卋堺 提交于 2020-01-11 14:42:47
问题 This question already has answers here : Android 6.0: Get package name of current activity [duplicate] (2 answers) Closed 4 years ago . I am using custom keyboard to share image to any app like Facebook,whatsApp and i want to know the current open application package name on onIteamClickListener of my custom keyboard to share data without chooser dialog. Below is my code grdPhoto.setOnItemClickListener(new AdapterView.OnItemClickListener() { @TargetApi(Build.VERSION_CODES.LOLLIPOP) @Override

Custom Keyboard - Add multiple emoji icons while long press on keyboard button

本秂侑毒 提交于 2020-01-10 04:37:06
问题 Anyone having an idea how to create a custom view for multiple emoji icons, while user long press on the keyboard. 回答1: You can find all the details and some raw Obj-C code here (gist). The code isn't complete but enough to start. Here only draw background image code: - (UIImage*)hintImage { CGMutablePathRef path = CGPathCreateMutable(); CGPoint p = CGPointMake(__PADDING_X, __PADDING_Y); CGPoint p1 = CGPointZero; CGPoint p2 = CGPointZero; //1 p.x += __PAN_UPPER_RADIUS; CGPathMoveToPoint(path,

Allow Full Access check in keyboards iOS10

感情迁移 提交于 2020-01-09 10:11:51
问题 Recently iOS has an update of iOS 10 & there are certain changes for developers one of the change is now we can't check allow full access the way we did previously is given below -(BOOL)isOpenAccessGranted{ return [UIPasteboard generalPasteboard]; } I searched the latest Developer Guide for UIPasteboard, but was unable to solve it. Did any one has a proper solution for this. 回答1: iOS11 and above is easy. iOS10 Solution: Check all the copy-able types, if one of them is available, you have full

Allow Full Access check in keyboards iOS10

て烟熏妆下的殇ゞ 提交于 2020-01-09 10:11:28
问题 Recently iOS has an update of iOS 10 & there are certain changes for developers one of the change is now we can't check allow full access the way we did previously is given below -(BOOL)isOpenAccessGranted{ return [UIPasteboard generalPasteboard]; } I searched the latest Developer Guide for UIPasteboard, but was unable to solve it. Did any one has a proper solution for this. 回答1: iOS11 and above is easy. iOS10 Solution: Check all the copy-able types, if one of them is available, you have full