Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix keyboard hiding bug #2652

Merged
merged 5 commits into from
Sep 3, 2024
Merged

Conversation

FikriMilano
Copy link
Collaborator

@FikriMilano FikriMilano commented Jul 29, 2024

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #2651

Description
Change ADJUST_RESIZE to ADJUST_PAN

Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type
Bug fix

Video

Blu G60 Android 9

326351102-a955eb10-7d2e-486c-b941-e106634a392a.mp4

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

Copy link
Collaborator

@jingtang10 jingtang10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @FikriMilano!

I have one concern with regards to your video - it seems to me with this option the screen is no longer adjusted to make room for the soft keyboard. And in your video you're only able to input text because the screen is just big enough so that the soft keyboard is not covering the text input right? If the screen was a little shorter the keyboard would actually cover the text input.

So, is there something we need to do in terms of the layout to make sure that doesn't happen?

ndegwamartin added a commit to opensrp/android-fhir that referenced this pull request Jul 30, 2024
    - With unmerged PR #9
    - WUP PR google#2178

- WUP google#2652
- WUP google#2521
- WUP google#2645
- WUP google#2648
- WUP google#2650
@FikriMilano
Copy link
Collaborator Author

FikriMilano commented Aug 4, 2024

So, is there something we need to do in terms of the layout to make sure that doesn't happen?

@jingtang10 Hard to say, I don't have a good idea at the moment.

But, I found this article that might be able to truly fix this issue by adding windowIsFloating tag. I'm not sure of it's downsides though. I'm going to try it and ask my QA to test it (I couldn't replicate the issue).

<item name="android:windowSoftInputMode">adjustResize</item>
<item name="android:windowIsFloating">false</item>

@FikriMilano
Copy link
Collaborator Author

The solution by adding windowIsFloating as false unfortunately does not pass QA

ScreenCapture_20240805_125237_163.mp4

@jingtang10
Copy link
Collaborator

What's the latest on this?

Copy link
Collaborator

@jingtang10 jingtang10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this seems not a perfect solution (not sure if one exists) it does solve the intial problem and we're moving from a deprecated constant to one that's not deprecated. So happy to approve this.

Thanks @FikriMilano for fixing this!

@jingtang10 jingtang10 enabled auto-merge (squash) September 3, 2024 09:30
@jingtang10 jingtang10 requested a review from a team as a code owner September 3, 2024 09:30
@jingtang10 jingtang10 merged commit f4041da into google:master Sep 3, 2024
6 checks passed
@jingtang10 jingtang10 deleted the 2651-keyboard-hides-itself branch September 3, 2024 10:25
ndegwamartin pushed a commit to opensrp/android-fhir that referenced this pull request Sep 10, 2024
* Fix keyboard hiding bug

* Update comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Keyboard hides itself when focusing to open-choice text box
2 participants