windowSoftInputMode: adjustResize doesn't work properly for numeric keyboard, when keyboard suggests text
Asked Answered
A

1

10

When text is copied to clipboard and suggestion is shown, top of keyboard hides the small part of view behind, I think it's a problem of "Gboard", because if EditText inputType is "text" everything works fine, but when it's "number" type, it causes problem.

Here is style that I use:

<style name="BottomSheetDialogStyle">
    <item name="android:windowIsFloating">false</item>
    <item name="android:statusBarColor">@android:color/transparent</item>
    <item name="android:windowSoftInputMode">adjustResize</item>
</style>

enter image description here

Aguste answered 23/3, 2021 at 10:49 Comment(4)
This feels like an OS problem -- the OS is responsible for interpreting adjustResize, and the OS should know how tall the keyboard is. I do not see an issue on the issue tracker for this. The closest one that I have found is issuetracker.google.com/issues/64142841, and that is 3.5 years old and is for an ancient version of the Support Library. You might try creating a sample project that demonstrates the issue, then filing a bug report, attaching that project and probably a screencast showing the behavior.Sletten
Did you try with a stock keyboard or another third party?Lavine
Can I see the layout xml? I want to give it a try.Tiruchirapalli
@SabetChowdhury github.com/nikachapo/Incorrect-Keyboard-Functionality-SampleAguste
G
1

Your problem is that you're using a bottom sheet and it does not expand completely and I guess if you try to scroll it, you can see the button completely.

We had a bad UI design like this in the pas, and a dirty solution we've finally found was removing the button from the bottom sheet and adding it to the Frame layout which is 3layers above the root of bottom sheet

Also there are some libraries like this which do the job https://github.com/xyzcod2/StickyBottomSheet

Gill answered 4/4, 2021 at 1:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.