keyboard

How to prevent popover from scrolling when Keyboard Appears

ぃ、小莉子 提交于 2020-01-06 06:05:09
问题 I have a form (Eureka form, in a UITableView) that I show in a iPad as a Popover. But when the keyboard appears, the Tableview scrolls down and hides the field that I am editing. Is there a way to prevent that kind of scroll when the popover change their size? Or a way to focus again the field that I am editing? This is the code in the Main View Controller func presentFormPopover(form: FormViewController) { let nav = UINavigationController(rootViewController: form) nav.modalPresentationStyle

How to prevent popover from scrolling when Keyboard Appears

梦想与她 提交于 2020-01-06 06:04:14
问题 I have a form (Eureka form, in a UITableView) that I show in a iPad as a Popover. But when the keyboard appears, the Tableview scrolls down and hides the field that I am editing. Is there a way to prevent that kind of scroll when the popover change their size? Or a way to focus again the field that I am editing? This is the code in the Main View Controller func presentFormPopover(form: FormViewController) { let nav = UINavigationController(rootViewController: form) nav.modalPresentationStyle

Catching “global hotkeys” (Windows)

南楼画角 提交于 2020-01-06 05:38:08
问题 Now I've been trying to create a similar functionality as there is in Push-To-Talk voice chat applications, but so far I couldn't find any fitting solutions to this. I am not using MFC or CLR. The problem is quite simple. My window should be usually out of focus (ie minimized etc), but I need to react to keypresses (basically, I don't even want to know if the button is being held down or not). Unfortunately, WM_KEYDOWN only works if the window has keyboard focus. I do know that for example

Catching “global hotkeys” (Windows)

百般思念 提交于 2020-01-06 05:38:06
问题 Now I've been trying to create a similar functionality as there is in Push-To-Talk voice chat applications, but so far I couldn't find any fitting solutions to this. I am not using MFC or CLR. The problem is quite simple. My window should be usually out of focus (ie minimized etc), but I need to react to keypresses (basically, I don't even want to know if the button is being held down or not). Unfortunately, WM_KEYDOWN only works if the window has keyboard focus. I do know that for example

iPad - Dismiss keyboard for modal view controller in UIModalPresentationFormSheet mode

五迷三道 提交于 2020-01-06 05:23:35
问题 In my iPad app I want to present some view controllers in UIModalPresentationFormSheet modal mode without keyboard . I use it to display help as an example. At the moment I use the code found on the one of stackoverflow answers to dismiss it: // trick to dismiss keyboard in iPad: if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){ // iPad specific behaviour: @try { Class UIKeyboardImpl = NSClassFromString(@"UIKeyboardImpl"); id activeInstance = [UIKeyboardImpl performSelector:@selector

Android WebView disable keyboard predictions

杀马特。学长 韩版系。学妹 提交于 2020-01-06 04:45:09
问题 I've been scouring the web for hours now looking for answer to these two questions, to no avail. How do I disable all keyboard auto-complete suggestions within an app/activity/WebView? Most answers focus on scenarios that include an EditText, but in my scenario, there is just a WebView with input fields. In the scenario described above, how do I keep the keyboard open all the time I am in the activity containing the WebView? Pressing the "Done" button on the keyboard makes the text field lose

Android : getting soft keyboard height

五迷三道 提交于 2020-01-05 12:13:54
问题 As the title, I just want to get the keyboard height. Since there are so many resolution on Android phones, it is hard to handle. So Is there any API for that? Thanks for all. 回答1: Use this code in your Activity: iSoftkeyboardHeight = viewMain.getHeight(); // viewMain - root view of your activity int y = iSoftkeyboardHeight - 2; int x = 10; int counter = 0; int height = y; int iSoftkeyboardHeightNow = 0; Instrumentation instrumentation = new Instrumentation(); while( true) { final MotionEvent

IME in Android Studio emulator not responding to Shift-B on keyboard

一笑奈何 提交于 2020-01-05 07:41:09
问题 I noticed that Shift-B is not being recorded or received on EditTexts when I am using the emulator with my physical keyboard. Keyboard works fine elsewhere in all other programs - "B" - see! Lower-case ''b' works fine everywhere All other SHIFT alphabet characters work from the keyboard except "B" Clicking on shift-B on the IME (soft keyboard) works fine When pressing SHIFT-b, the onKeyListener.onKey() receives a keyCode of 0 I have used Android Studio and the Emulator extensively for a year

Move Button & View when Keyboard Appears in Swift

五迷三道 提交于 2020-01-05 05:46:17
问题 I am trying to move a button that is initially at the bottom of the view, but when a text field is selected and the keyboard rendered, move the button up with it. If you have used the app Robinhood, its the same functionality when signing in or signing up. Several other posts have not been able to solve this for me. Move view with keyboard using Swift Is there an external repo or solution that has already solved this feature? 回答1: First of write the below code into the ui view extension.

Keyboard is hidden on orientation change

巧了我就是萌 提交于 2020-01-04 06:48:47
问题 My keyboard is hidden when the orientation of the android phone changes to landscape. What should I do in order to show my keyboard? 回答1: Add this on your code getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); 回答2: getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); put this in onCreate() and onResume() in your class file. 回答3: Hi can you try AndroidManifest.xml android:windowSoftInputMode="stateAlwaysVisible" put