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

[Android] Soft Input Resize doesn't properly resize #7369

Closed
Redth opened this issue May 20, 2022 · 6 comments
Closed

[Android] Soft Input Resize doesn't properly resize #7369

Redth opened this issue May 20, 2022 · 6 comments
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working
Milestone

Comments

@Redth
Copy link
Member

Redth commented May 20, 2022

Description

With android, handling the on screen keyboard (or soft input), there's a couple of options to deal with the change in screen real estate, including Pan and Resize.

At some point, Resize stopped working well in both Xamarin.Forms and .NET MAUI.
There's a workaround listed here: https://stackoverflow.com/questions/34013548/xamarin-forms-2-0-appcompat-android-keyboard-mode which points at a google issue: https://code.google.com/p/android/issues/detail?id=5497 which basically uses a view tree observer to change things based on the visible part of the window with the keyboard open.

I have a video which shows the Xamarin.Forms code implementing this workaround on the left side, and then the current MAUI code without the workaround on the right side.

android-adjust-resize.mp4

Steps to Reproduce

  1. Create an app with a bunch of Entry's inside a scrollview so that the scrolling area extends past the height of the screen
  2. Set the soft input mode on the app to Resize

Version with bug

Release Candidate 3 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

N/A

Did you find any workaround?

No response

Relevant log output

No response

@Redth Redth added t/bug Something isn't working s/needs-verification Indicates that this issue needs initial verification before further triage will happen s/verified Verified / Reproducible Issue ready for Engineering Triage platform/android 🤖 and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels May 20, 2022
@Redth Redth added this to the 6.0.3xx-sr2 milestone May 20, 2022
@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label May 20, 2022
@mattleibow mattleibow modified the milestones: 6.0-sr2, 6.0-servicing Aug 29, 2022
@Redth Redth modified the milestones: 6.0-servicing, Backlog Aug 30, 2022
@ghost
Copy link

ghost commented Aug 30, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@stegl83
Copy link

stegl83 commented Oct 7, 2022

Hi,
I had the same issue and found out something interesting!
My application has a page with one entry and my own commandBar-Control docked on bottom.

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="12"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <Entry Grid.Row="0"/>

        <!-- CommandBar -->
        <mctk:CommandBar Grid.Row="3">
            <mctk:CommandBar.PrimaryCommands>
    ...
            </mctk:CommandBar.PrimaryCommands>
        </mctk:CommandBar>
    </Grid>

When setting the focus on the entry the InputPanel comes up and hides the commandbar.

But when I add one senseless ScrollViewControl like this:

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="12"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <Entry Grid.Row="0"/>

        <!-- Workaround for SIP-problem -->
        <ScrollView Grid.Row="2"/>

        <!-- CommandBar -->
        <mctk:CommandBar Grid.Row="3">
            <mctk:CommandBar.PrimaryCommands>
    ...
            </mctk:CommandBar.PrimaryCommands>
        </mctk:CommandBar>
    </Grid>

Page Resize works fine on setting focus on Entry!

@Kremed
Copy link

Kremed commented Feb 17, 2023

I'm still facing this problem, any updates?

@samhouts samhouts removed the s/verified Verified / Reproducible Issue ready for Engineering Triage label Apr 5, 2023
@simon10says
Copy link

I faced similar issue in TabbedPage as shown below where the bottom tab will resize incorrectly

Screenrecorder-2023-06-13-03-57-38-651.mp4

Enclosed is the sample code: SoftInputIssue.zip

Similar issue: #11979

@Zhanglirong-Winnie Zhanglirong-Winnie added s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version labels Aug 2, 2023
@ghost
Copy link

ghost commented Aug 2, 2023

Hi @Redth. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@Zhanglirong-Winnie
Copy link

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 5.0. Not repro on android platform with template MAUI project.
7369

@ghost ghost closed this as completed Aug 13, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Sep 12, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants