Android 10 EditText box not updating with keyboard inputs - android

I've been thrown into trying to fix bugs in an app I didn't write, and I'm not all that familiar with Android. I'm having problems with text boxes not updating with keyboard inputs. Here's whats happening:
In android 10 (only) when I click on a text box, type stuff with the soft keyboard, nothing shows up in the textbox until the soft key board is minimized. But it works 100% fine in Android 5.1, 6, 8.1. (Also, compiling app with SDK for Android 8.1 or 10 makes no difference). The text box is never covered or hidden by the keyboard, it just remains empty until the keyboard is minimized.
The only thing that works is if I make the keyboard floating type, or if I position the textbox way at the top of the layout such that Android does not need to pan or resize the view to accommodate both the box and the default keyboard. A floating keyboard works anywhere, even partially over top of this text box.
I have tried every possible parameter combination I can find in the manifest and layout xml files, including android:windowSoftInputMode , android:fitsSystemWindows , android:isScrollContainer , android:gravity , android:paddingBottomandroid:configChanges
The fact this is -only- an issue for Android 10 is suspicious.

For anyone that finds this in the future: the issue turned out to be that hardware acceleration needed to be turned on. See EditText in Android doesn't show text when typing while using the on-screen keyboard

Related

How to disable Keyboard suggestions on EditText and tell the keyboard to show extra number row

I have an EditText in my layout file. When I click(focus) on EditText a soft keyboard appear contains predictive word in keyboard suggestion bar(see figure 1).
Figure 1
But I want that when I will click on my EditText keyboard will appear with no suggestion bar and with an extra number row(see Figure 2).
Figure 2
I already tried some answer saying that adding below attribute will do that but none of them seems worked for me.
inputType="text|textNoSuggestion",inputType="textFilter" not worked.The below code work but also open a secure keyboard.(oppo,vivo phone built in feature)
inputType="textNoSuggestion|textVisiblePassword"
Is there any solution to make it done without opening secure keyboard?
N.B. I don't wanna disable the secure keyboard.
I saw this feature on some code editing application available on playstore.

Android keyboard overlapping input fields only scroll after type input

I have the similar problem described in this question. I've tried android:windowSoftInputMode="adjustResize" but it's not scrolled automatically scroll; it's only scrolling after type something into the input. I need that it scroll input on top immediately after keyboard showing, so no need to type anything into the input before I can see the input.
The problem does not happen on Android 4.4, Android 5. Android 6 and onward it does happen. I use Cordova 6.
(Pictures are taken from Android keyboard overlapping input fields, view doesn't scroll automatically for demonstration purpose)

Android's EditText not receiving keyboard input correctly

Just found myself trying to figure out this strange behavior in for EditText.
Information:
Bug seems to only happen in some devices! for now I've only seen it in Sony Xperia D2303.
App description:
I'm working on an app that has a main activity and navigation is done trough different fragments that are replaced as user moves from one section to another.
At one point I'm showing a DialogFragment with an edit text field, with background set to #null, with a hint text. (I have also tried with a normal edit text, taken from widget list and dragged to the layout and found the same behavior).
Problem:
When clicking on the EditText, software keyboard SHOWS UP but when typing there is no letter input in the EditText! I can long press, to visualize cursor position marker and also the magnifying glass shows up.
Things I've tried:
- I've tried requesting focus with xml, programmatically.
- Setting touchable(in touch mode also)
- Setting descendantFocusability attribute of parent to 'afterDescendants'
- Overriding onTouchListener and showing keyboard programmatically through the InputManager and using the edit text's token
… and maybe other things which I don't remember
There is but a workaround that I've found!!! sending the app to background, and bringing it to foreground again… so it seems something related to focus maybe?? but then why does keyboard show up, and cursor marker and magnifying glass work?
This solution does not work for me as it depends on the user taking action
Has anyone found this problem? any suggestions?
Thanks in advance!

Text Area / Input fields only get partial text filled in on Samasung s3 in chrome / webview

We observed a very strange bug with our app on the samsung s3 (running android 4.0.4 )
When typing text into a text area only the first character of each word would fill in, and only after you pressed space or picked a word from predictive text.
Typing 'what the hell ..' would result in 'w t h' being entered in the text area
Other text areas on different screens were working fine.
Turning off predictive text also fixed the issue.
Has anyone run into this issue before?
After further investigation we noticed that the problematic textarea wasn't changing appearance when it got focus - all our working text fields turned into square cornered fields with orange borders when clicked.
It turns out android does something odd and dynamically replaces your input fields with native elements as they get focus (hence the un-style-able orange bordered square bits :( ).
the kicker - if your input is inside an element with css absolute positioning this fails, and this also seems to mess up some forms of keyboard input. setting the element (and parent elements) to use position static fixes the issue.
We only saw this on the s3 when predictive text was on (this is the default..) but it may be on other devices.
Chalk this one up to Androids browser still being a mess..
Note that using this css hack to stop the native elements from being substituted:
input:focus { -webkit-user-modify: read-write-plaintext-only; }
caused ALL our text fields to have the problem outlined in this thread.
I had this problem too for a long time but have found that the key to stopping this glitch is to turn off the predictive text option in the keyboard settings every time you experience the 1st character input only problem. Personally, I like the predictive text being on 99% of the time, but some web pages (email providers mainly) aren't configured for predictive text to be used, so I keep predictive text on & just turn it off whenever I come across a web page where I experience the 1st character input only problem. To turn it on/off simply hit the cog button on the keyboard & where it says predictive text, just swipe the slider to the left, to the off position. This will allow whole words to be typed instead of just 1 character at a time. Then, once you've finished typing, you can hit the cog again & turn predictive text back on.

Android keyboard cannot click through views

I am developing a keyboard based on android LatinIME, the problem is that I cannot click on anything behind InputView. (In android keyboard this view is visible and clickable through when doing google search for example).
To be precise this is the view that can be clicked through in original keyboard from input-view.xml
<View
android:id="#+id/key_preview_backing"
android:layout_width="match_parent"
android:layout_height="#dimen/key_preview_backing_height" />
I turned on visual debug by setting sVISUALDEBUG in LatinIMELogger.java to true so I can see these are in transparent red.
Any possible suggestion about what can be broken so it works this way?
I resolved this issue. The problem was that in compatibility.InputMethodService.Insets in android 2.1 doesn't support TOUCHABLE_INSETS_REGION constant, so I had to changed it TOUCHABLE_INSETS_VISIBLE to enable clicking through invisible views of my keyboard (i.e. SuggestionsView)

Categories

Resources