maui icon indicating copy to clipboard operation
maui copied to clipboard

[regression/8.0.0-rc.1.9171] RefreshView indicator hidden behind Navigation bar

Open KarsaOrlong1981 opened this issue 2 years ago • 8 comments

Description

When using an RefreshView at .net 8 the indicator at refreshing is always hidden behind navigation bar, before at .net 7 I can see it completly.

.net 8 behind

.net 7 behind7

<ContentPage.Content>
     <RefreshView  >
             <CollectionView 
                  ItemsSource="{Binding Employees}" 
                  ItemTemplate="{StaticResource EmployeeTemplate}" 
                  ItemsLayout="VerticalGrid, 2" />
         </RefreshView>
        

     
 </ContentPage.Content>

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.0-rc.1.9171

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.0-preview.7.8842

Affected platforms

Android

Affected platform versions

Android 13

Did you find any workaround?

No response

Relevant log output

No response

KarsaOrlong1981 avatar Sep 24 '23 18:09 KarsaOrlong1981

I'm having the same issue with the version 8.0.0-rc.1.9171

After some investigation i think this commit is causing the issue, seems to be overriding the calculation of the offset value with '50'

As a workaround i have created a handler to grab that calculated value and assign it after connecting the handler

protected override void ConnectHandler(MauiSwipeRefreshLayout platformView) {

    int deviceOffset = platformView?.ProgressViewEndOffset ?? 0;

    base.ConnectHandler(platformView);

    platformView?.SetProgressViewEndTarget(true, deviceOffset);

}

Hope it helps.

andyx48 avatar Sep 25 '23 00:09 andyx48

Great, thank you I will try it.👌

KarsaOrlong1981 avatar Sep 25 '23 06:09 KarsaOrlong1981

@andyx48 Perfect, your workaround solve that issue for now. I only have to add this handler to Android, configure it at MauiProgramm and boom.

works

namespace DragAndDropCollectionView.Droid   
{
    public class CustomRefreshViewHandler : RefreshViewHandler
    {
        protected override void ConnectHandler(MauiSwipeRefreshLayout platformView)
        {

            int deviceOffset = platformView?.ProgressViewEndOffset ?? 0;

            base.ConnectHandler(platformView);

            platformView?.SetProgressViewEndTarget(true, deviceOffset);
        }
    }
}

                .ConfigureMauiHandlers(handlers =>
                {
#if __ANDROID__
                    handlers.AddHandler(typeof(RefreshView), typeof(Droid.CustomRefreshViewHandler));
#endif

                });

KarsaOrlong1981 avatar Sep 25 '23 13:09 KarsaOrlong1981

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

ghost avatar Sep 25 '23 14:09 ghost

The cause of the issue is the same here https://github.com/dotnet/maui/issues/17592

jsuarezruiz avatar Sep 25 '23 14:09 jsuarezruiz

Confirmed that this regressed between 8.0.0-preview.7.8842 and 8.0.0-rc.1.9171. https://github.com/dotnet/maui/pull/17080 looks sus.

samhouts avatar Sep 28 '23 21:09 samhouts

@PureWeen So it won't be fixed for .NET 8 GA? I'm wondering why? Is it considered to be a low priority? I mean, it probably affects almost every app out there...

Dreamescaper avatar Oct 10 '23 20:10 Dreamescaper

Same problem with released 8.0 https://github.com/dotnet/maui/issues/18987

w3ori avatar Nov 23 '23 16:11 w3ori

@andyx48 Perfect, your workaround solve that issue for now. I only have to add this handler to Android, configure it at MauiProgramm and boom.

works

namespace DragAndDropCollectionView.Droid   
{
    public class CustomRefreshViewHandler : RefreshViewHandler
    {
        protected override void ConnectHandler(MauiSwipeRefreshLayout platformView)
        {

            int deviceOffset = platformView?.ProgressViewEndOffset ?? 0;

            base.ConnectHandler(platformView);

            platformView?.SetProgressViewEndTarget(true, deviceOffset);
        }
    }
}

                .ConfigureMauiHandlers(handlers =>
                {
#if __ANDROID__
                    handlers.AddHandler(typeof(RefreshView), typeof(Droid.CustomRefreshViewHandler));
#endif

                });

Thanks a lot !

CorentinSwiss4 avatar Jan 22 '24 15:01 CorentinSwiss4