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

ScrollView inside a Grid with multiple Rows and Columns not working #7607

Closed
ederbond opened this issue May 30, 2022 · 4 comments
Closed

ScrollView inside a Grid with multiple Rows and Columns not working #7607

ederbond opened this issue May 30, 2022 · 4 comments
Labels
area-controls-scrollview ScrollView layout-grid platform/android 🤖 s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@ederbond
Copy link
Contributor

ederbond commented May 30, 2022

Description

If you have a Grid with 2 rows and 3 columns and you put a ScrollView inside of this Grid set the ScrollView to be on
Grid.Row="1"
Grid.ColumnSpan="3"
the ScrollView stop working (you can't swipe to scroll).

Notice that if you remove one of these Grid attached property from the ScrollView it will start working again.

I've just tested it on Android but please. Make sure you fix it on other platforms too (iOS and Windows)

Steps to Reproduce

Download this sample:
https://github.com/ederbond/ScrollView_With_Grid_ColumnSpan_Bug

Run the app on a Pixel 5 Android emulator and try to scroll down using a swipe gesture.
It won't work

Version with bug

6.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11 and iOS, Windows, Tizen, MacOS ...

Did you find any workaround?

No

Relevant log output

No response

@ederbond ederbond added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels May 30, 2022
@ToolmakerSteve
Copy link

ToolmakerSteve commented May 31, 2022

  • Does the content in that row go beyond the bottom of screen?
  • If instead of Auto, you use a fixed row height that is small enough to require scrolling, does it work then?

@VincentBu
Copy link

repro with vs main build 32530.96.main

@VincentBu VincentBu added s/verified Verified / Reproducible Issue ready for Engineering Triage and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels May 31, 2022
@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label May 31, 2022
@AlexanderEgorov
Copy link

Still repro with maui-ios 7.0.0-rc.2.6866/7.0.100-rc.2

@hartez
Copy link
Contributor

hartez commented Feb 23, 2023

Change RowDefinitions="150,Auto" to RowDefinitions="150,*".

The Auto height tells the ScrollView to be whatever height it wants, so it takes enough height to display all of its content (which means it runs off the edge of the screen). Since all of its content is displayed, it has no need to scroll.

Changing that height to * tells it that it has to fit within the remaining area of the screen (after satisfying the height of 150 for the first row). So it lays out in the remaining space, which is not large enough to display all of its content; now it needs to allowing scrolling.

@hartez hartez closed this as completed Feb 23, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 25, 2023
@Eilon Eilon removed the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label May 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-scrollview ScrollView layout-grid platform/android 🤖 s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants