Android - Slow to hide the soft keyboard - android

I have a problem, the keyboard is hidden very slow and has a delay to hide (approx 1 second).
I have another application, which uses fragments, normal work, the keyboard is hidden fast.
I have done some tests:
1 - when there is something behind the keyboard (cardview or another control like imageview), it freezes and lag for 1 second before hiding..
2 - when there is nothing behind (empty layout), hide quickly.
I leave two screenshots:
Normal Keyboard
Here, the keyboard is hidden, but look at the screen, is not refreshing !!!
After one second the screen is refreshed correctly and the keyboard is hidden, but why this happens?
thanks !!!

Add following line in AndroidManifest.xml
<activity
android:name=".YourActivity"
android:windowSoftInputMode="adjustPan"
android:label="#string/app_name"
>

Related

Android: When keyboard pops up, how to stop MapView and buttons from moving up?

EDIT: When I used to click on searchView, my buttons would appear above the keyboard. Then I was told on stackOverflow to use the following code:
android:windowSoftInputMode=“adjustNothing"
or
android:windowSoftInputMode="adjustPan"
Placed the above code in AndroidManifest.xml under android:name=".MainActivity"
Now the buttons don't jump above the keyboard but they still do jump a little. It seems to me the jump is still affected by the rise of the 3 Android buttons at bottom of screen (home, back, 3rd button) that rise along with keyboard (At least that's how it works on my Samsung Galaxy Note 8).
Is there a code that goes in AndroidManifest.xml that also states that when the 3 android buttons (home, back, 3rd button) rise with keyboard, the buttons/labels and mapView won't rise along with it?
(Not using scrollView and using Constraint Layout.)

How to arrange the layout when Soft Keyboard opens up in android

I have searched for various answers for this particular problem but could not find one. I am developing an android application and I am currently up to arranging the layouts.
My problem is when a soft keyboard opens up in a form containing lots of input fields, the buttons at the bottom also keeps coming up. What I want is the buttons should not come up and along with this the form should be scrollable to bottom of the layout while the soft keyboard is still visible.
Before I was trying lots of modes combinations for windowSoftInputMode inside AndroidManifest.xml in the respective activity, but could not get any satisfactory result.
Screenshots:
The normal form (shown the bottom part) looks like this:
When the soft keyboard opens up, it cuts the lower portion i.e. I am unable to scroll the layout further.
I somehow managed to remove the buttons using following code, I do not know whether this is correct or not:
<activity
android:name=".usermanagement.SignUp"
android:label="साइन अप"
android:windowSoftInputMode="stateVisible|adjustPan" />
Now I am wondering whether I can scroll to the bottom of the layout while keeping the soft keyboard active and not showing the buttons(Home button and Next button)

Android windowSoftInputMode issue

In my application, I am using <activity android:windowSoftInputMode="adjustResize"> for the keyboard pop up effect. When used "adjsutResize" I see there is a little flash of black screen before the Keyboard window pops up. I do not want to see any flash in the keyboard appearance. So I tried "stateVisible|adjustPan" in place of "adjsutResize" and I got rid of flash but now for each and everytime I navigate to a page the keyboard automatically pops up (even though there is no need of its pop up) and goes hidden.
Could anyone here let me know what kind of value/param for android:windowSoftInputMode will help me solving this issue.
I finally found it myself. Changing the value android:windowSoftInputMode to "adjustPan" gives the keyboard pop up the better view (transparent while popping up/down). I see no flash of the black screen before the keyboard pop up.

Fragment 2 pane windowSoftInputMode for soft keyboard

I am facing issues when soft keyboard opens up on my 2 pane layout as seen above.
For the left side list view fragment i want to adjustPan the soft input. If i don't do this then when the soft keyboard closes it leaves back blank space on the list fragment.
For the right side detail pane i want to adjestResize the soft input so that user can enter text into both edit texts and click button with soft keyboard still open.
I tried setting the properties differently for my fragments in their respective onCreateView() using setSoftInputMode() but that did not help me much because both fragments got adjustResize finally.
Any solutions/ideas which will help me with this?
Thanks in advance.
to ensure that the system resizes your layout to the available
space—which ensures that all of your layout content is accessible
(even though it probably requires scrolling)—use "adjustResize":
<application ... >
<activity
android:windowSoftInputMode="adjustResize" ... >
...
</activity>
...
Please go through this tutorial

Screen flashes white on EditText focus

My application has many different screens, but only screens with EditText's on them have this bug.
The page loads at a normal speed but once the user clicks in an EditText, The enitre screen flashes white except for the ActionBar for a noticable amount of time (maybe a quarter to half a second) and then goes back to what it is supposed to look like (the background is gray not white). This only happens on the first EditText focus after the activity starts so once the screen flashes once, it won't do it again unless the activity is reloaded.
Here is the relevant part of the manifest:
<activity
android:name="com.bottegasol.com.android.migym.View.Views.FeedbackActivity"
android:label="#string/title_activity_feedback"
android:logo="#android:color/transparent"
android:screenOrientation="portrait"
android:theme="#style/Theme.Example"
android:uiOptions="splitActionBarWhenNarrow" >
</activity>
There is nothing in it related to the SoftKeyboard resizing or anything like that. And the code contains no focus or keyboard change listeners.
I got this bug on a Motorola Razor Maxx and an HTC One X both running Jellybean. My emulator running api 10 didn't get this problem. Does anyone have any idea of where to start hunting for this? I couldn't find anyone else with this issue.

Categories

Resources