Most of the time (but not always), when I finish typing in a or and the soft keyboard hides, the view area is left raised with a black space on the bottom. Clicking, tilting or otherwise engaging the phone corrects the screen. However, user's first motion is usually pressing , but if you click submit it jumps down and you actually just click on the text area again. How do you stop this and get the screen to reset after the keyboard closes.
Take a look at you AndroidManifest.xml
http://developer.android.com/guide/topics/manifest/activity-element.html
I think you need to change android:configChanges.
I have the exact same problem what i did was handle hidekeyboard even in javascript and do something like window.scrollTo(0,0) or $("input[type=text],textarea").blur();
This will cause the the screen to get back to normal position
But there is just one problem when click from input field of type = text to a input field password it internally hide the keyboard which causes the hidekeyboard event to fire and scrolls the screen to top. This is the only side effect of this
Let me know if you find the solution for this
Related
I have a very simple UI that has one entry control to enter phone number and a button. The entry control has a handler for removing border around it. When the entry control got focus, keyboard pops up. But when I try to tap outside the entry control such as on the screen empty area, the keyboard does not dismiss and the entry control does not lose focus. Also since the button is at the bottom of the screen, therefore, the soft keyboard hides it and there is no way to tap the button. The button can only be tapped if I press the Android device back button.
At present, I have not checked this behavior on an iOS device.
This was not a problem in Xamarin Forms though. I searched a lot on Internet and found that it is currently a bug in MAUI.
I tried to attach a tap gesture on the parent layout control and invoked platform-specific code to hide the keyboard but it seems the entry does not lose focus and in turn the tap gesture event is never called.
However, the entry control should lose focus automatically when I tap outside the entry control (such as on the screen) and the soft keyboard should automatically dismiss.
Please provide a workaround if there is any.
Known bug. Removing the focus sometimes helps. Sometimes you need to do Disable/Enable in sequence. (I go with the second).
If you want, you can read this for example:
https://github.com/dotnet/maui/issues/12002
(Most disturbing part, considering this is know bug for half year+)
We can leave the behavior how this is for now in NET7 and provide an
API in NET8 that lets users toggle this behavior on/off for iOS and
Android
I have the keyboard open in my app, I want the user to be able to type, and then tap a colour selector widget I have made (which changes text colour). The problem is that it takes 2 taps, the first one closes the keyboard, the second one actually selects my colour picker. Is there a way to make this one tap? and also keep the keyboard open if possible, so they can change colour then go back to typing without focus issues.
Although I am pretty sure this is doable, I just wanted to double check with you all.
I need to hide certain UI elements(like checkbox, lables etc) on the screen when User taps on the edittext field, just before Keypad comes up and take up half the screen. Same should be visible once Keypad is removed from the screen. I am thinking of using View.GONEon those UI elements, but I am not sure how to get them back once the Keypad is removed from the screen.
I want you help in knowing if this is possible, if so how can revert it when Keypad is no more on the screen.
Thanks,
SKU
I'm using the v16 API and having problems with where the popup is being placed when the onscreen keyboard is displayed.
The first problem is that if the EditText is at the bottom of the screen, when I touch the field to open it for editing the popup is displayed below the control and the immediately covered as the keyboard appears. It doesn't reposition itself above the EditText until a keypress triggers my validation code to fire again on the new value.
The second problem is that when I close the keyboard and the ScrollView containing the text scrolls back down from where it positioned itself to show the EditText above the keyboard the popup remains placed on the upper half of the screen instead of where the EditText is until I touch something else on the screen (triggering the ScrollView to do a redraw???).
Unfortunately that popup has various problems like this :(
Perhaps a simple solution in your case is to forcibly invalidate the UI when the keyboard has displayed and dismissed? Can't recall if the Popup will reposition if the EditText is invalidated, but worth trying as the alternative may be to re-implement.
Checkout my android-formidable-validation lib on github, it re-implements...though has its own problems - if you go down that path, why not give me a hand with some contributions ;)
I am working on an android app and really enjoying it too. But today, I got stuck on a small problem with soft keyboard.
I have an EditText at the bottom of the screen and when user clicks on it a keyboard pops up ,resizing the entire view to show the EditText above keyboard, which is as it should be. But if user doesn't do anything for sometime, phone sleeps and screen gets locked with the keyboard still present in the screen. When phone comes back after sleep, the keyboard seems to hide itself, leaving my views in a resized state. A blank space is shown where the keyboard has been present..I would be happy if
The keyboard remains there after
coming back from sleep..
Let the keyboard hide,but my views
should go back to original size, ie
without any blank space..
What can I do to achieve any of these?