maui icon indicating copy to clipboard operation
maui copied to clipboard

ScrollView is not scrollable inside of RefreshView

Open Dreamescaper opened this issue 3 years ago • 9 comments

Description

Seems like VerticalStackLayout grows infinitely inside of RefreshView, therefore you cannot scroll any content inside of RefreshView.

Steps to Reproduce

  1. Run the page with the following content:
    <RefreshView>
        <ScrollView>
            <VerticalStackLayout Spacing="50">
                <Label Text="1" />
                <Label Text="2" />
                <Label Text="3" />
                <Label Text="4" />
                <Label Text="5" />
                <Label Text="6" />
                <Label Text="7" />
                <Label Text="8" />
                <Label Text="9" />
                <Label Text="10" />
                <Label Text="11" />
                <Label Text="12" />
                <Label Text="13" />
                <Label Text="14" />
                <Label Text="15" />
                <Label Text="16" />
                <Label Text="17" />
                <Label Text="18" />
                <Label Text="19" />
                <Label Text="20" />
            </VerticalStackLayout>
        </ScrollView>
    </RefreshView>
  1. Try to scroll down.

ER: Content is scrolled successfully,

AR: You cannot scroll down.

screen recording

qemu-system-x86_64_feQxnECfxb

Version with bug

Preview 14 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, Windows

Affected platform versions

Android 12

Did you find any workaround?

You can wrap it in yet another ScrollView, so it would look something like that:

    <ScrollView>
        <RefreshView>
            <ScrollView>
                <VerticalStackLayout>
                      ...
                </VerticalStackLayout>
            </ScrollView>
        </RefreshView>
    </ScrollView>

Relevant log output

No response

Dreamescaper avatar Apr 02 '22 12:04 Dreamescaper

repro on Android 12 with vs 17.2.0 Preview 2.1. repro project: MauiApp5.zip

kristinx0211 avatar Apr 06 '22 10:04 kristinx0211

Possible relation with this - https://github.com/dotnet/maui/issues/3248 This bug still present in VS Preview 1.1

Realinspirer avatar Jun 18 '22 11:06 Realinspirer

Still seeing this bug in the latest release. (Preview 5)

AndreasReitberger avatar Jul 31 '22 07:07 AndreasReitberger

I am fighting with this problem :S, the workaround of making a wapper of the RefreshView with a ScrollView works in android but in IOS the Command does not execute....

My layout structure is:

<ScrollView>
    <RefreshView Command="{Binding LoadUserInfoCommand}" IsRefreshing="{Binding IsRefreshing}">
        <ScrollView>
            <VerticalStackLayout>

https://user-images.githubusercontent.com/1795296/183256058-b6694642-1f7d-4139-b7d5-fdd553c94a11.mov

https://user-images.githubusercontent.com/1795296/183256076-a0dd8371-119b-4df2-8431-9bd40c10212d.mov

xiz0r avatar Aug 06 '22 15:08 xiz0r

I am getting the same error, how can I fix it.

bangnguyen794 avatar Aug 27 '22 03:08 bangnguyen794

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.

ghost avatar Aug 30 '22 15:08 ghost

This bug is marked as Windows/Android but iOS has the exact same issue. RefreshView is not usable with any content that is already scrollable.

activa avatar Sep 25 '22 16:09 activa

Same issue here. RefreshView is pretty useless without this fixed.

uxsoft avatar Oct 17 '22 21:10 uxsoft

There is ugly workaround, but at least application is functional.

    <ScrollView>
        <StackLayout>
            <RefreshView IsRefreshing="{Binding IsBusy}" Command="{Binding RefreshCommand}" HorizontalOptions="FillAndExpand">
                <ScrollView VerticalScrollBarVisibility="Never">
                    <!-- this is scrollable RefeshView area, pulling down from this content will initiate RefreshView -->
                    <StackLayout>
                        <Label Text="Account" FontAttributes="Bold"/>
                        <Picker ItemsSource="{Binding Accounts}" SelectedItem="{Binding SelectedAccount}" HorizontalOptions="Fill"/>
                        <!-- Separate Issue with RefreshView, need transparent BoxView, so RefreshView takes all the width of the screen, otherwise content is truncated -->
                        <BoxView HeightRequest="0" Color="Transparent" BackgroundColor="Transparent"/>
                    </StackLayout>
                </ScrollView>
            </RefreshView>
            <!-- other controls, that will be scrolled as usual, but will not initiate RefreshView -->
        </StackLayout>
    </ScrollView>

EvgenyMuryshkin avatar Oct 28 '22 00:10 EvgenyMuryshkin