Skip to content

Conversation

@MozhganPeivandianSharbaf
Copy link
Contributor

…n on Android 10

IPC-756

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where the virtual keyboard was not being retained on screen during device rotation on Android 10 and below. The solution implements keyboard state persistence and restoration specifically for API levels Q (29) and below.

Key changes:

  • Added a keyboard visibility extension function for consistent IME management across API versions
  • Implemented keyboard state tracking and restoration logic in ReviewBottomSheet for Android 10 and below
  • Applied similar keyboard persistence functionality to ReviewFragment for consistent behavior

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
Extensions.kt Adds a new showKeyboard() extension function that handles IME display with API version compatibility
ReviewBottomSheet.kt Implements keyboard state persistence and restoration logic for Android 10 and below devices
ReviewFragment.kt Applies similar keyboard persistence functionality to maintain consistency across fragments

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@MozhganPeivandianSharbaf MozhganPeivandianSharbaf changed the base branch from main to IPC-716-refactor-for-accessibility August 28, 2025 10:18
if (et?.isShown == true && et.isEnabled && et.isFocusable) {
viewLifecycleOwner.lifecycleScope.launch {
delay(VIEW_SETTLE_DELAY_MS)
et.showKeyboard() // your helper already requests focus
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please change it to
Helper already requests focus (removing your)

Copy link
Contributor

@obaidgini obaidgini left a comment

Choose a reason for hiding this comment

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

@MozhganPeivandianSharbaf there is a small comment related to "comments". I have approved it because it is a very small change, when you get free please remove that. Thank you

@MozhganPeivandianSharbaf MozhganPeivandianSharbaf force-pushed the IPC-756--Keypad-is-not-retaining-on-the-screen-while-rotation-on-Android-10 branch from e8bd1d1 to 02a9751 Compare September 1, 2025 08:55
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 1, 2025

@MozhganPeivandianSharbaf MozhganPeivandianSharbaf merged commit f4af3fc into IPC-716-refactor-for-accessibility Sep 1, 2025
18 checks passed
@MozhganPeivandianSharbaf MozhganPeivandianSharbaf deleted the IPC-756--Keypad-is-not-retaining-on-the-screen-while-rotation-on-Android-10 branch September 1, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants