maui
maui copied to clipboard
[regression/8.0.0-rc.1.9171] RefreshView indicator hidden behind Navigation bar
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
.net 7
<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
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Affected platforms
Android
Affected platform versions
Android 13
Did you find any workaround?
No response
Relevant log output
No response
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.
Great, thank you I will try it.👌
@andyx48 Perfect, your workaround solve that issue for now. I only have to add this handler to Android, configure it at MauiProgramm and boom.
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
});
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.
The cause of the issue is the same here https://github.com/dotnet/maui/issues/17592
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.
@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...
Same problem with released 8.0 https://github.com/dotnet/maui/issues/18987
@andyx48 Perfect, your workaround solve that issue for now. I only have to add this handler to Android, configure it at MauiProgramm and boom.
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 !
