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

Excessive Space In Global Header and Footer on iOS #45

Closed
SMBened opened this issue May 30, 2024 · 4 comments
Closed

Excessive Space In Global Header and Footer on iOS #45

SMBened opened this issue May 30, 2024 · 4 comments

Comments

@SMBened
Copy link

SMBened commented May 30, 2024

Found in version: 0.3.2

I'm currently working on an application that uses Virtual List Views to render lists of dynamic templated objects and for that I have no issues. However, I need to add a "floating button" that occludes the list, but at the same time leave enough space at the bottom of the list view so that the user can scroll all the way to the bottom of the list to see the entirety of the last item without the button covering it.

On Android, I was able to achieve this by adding a Global Header with a single grid row of height 0 and a Global Footer with a single row of the necessary height. This works beautifully.

<vlv:VirtualListView.GlobalHeader>  <!--Footer only appears if there is a header--> 
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="0"/>
        </Grid.RowDefinitions>
        <BoxView Background="Transparent" Grid.Row="0"/>
    </Grid>
          
</vlv:VirtualListView.GlobalHeader>
<vlv:VirtualListView.GlobalFooter>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="80"/>
        </Grid.RowDefinitions>
        <BoxView Background="Transparent" Grid.Row="0"/>
    </Grid>
</vlv:VirtualListView.GlobalFooter>

However, this same code is causing an excessive amount of dead space in the header and footer on iOS. @aritchie

@SMBened
Copy link
Author

SMBened commented May 30, 2024

@Redth
Copy link
Owner

Redth commented Jun 7, 2024

Does it still happen if you use say a ContentView instead of a BoxView?

@Redth
Copy link
Owner

Redth commented Jun 7, 2024

This will be fixed in #43

Though I'd suggest simplifying your controls used...

<vlv:VirtualListView.GlobalHeader>
    <ContentView HeightRequest="1" />
</vlv:VirtualListView.GlobalHeader>
<vlv:VirtualListView.GlobalFooter>
    <ContentView HeightRequest="80" />
</vlv:VirtualListView.GlobalFooter>

There's no need to use BoxView when a simple ContentView will suffice, also the Grid isn't really needed. I see that there needed to be a header to make both show, but this will also be fixed in the PR mentioned.

@Redth
Copy link
Owner

Redth commented Jun 7, 2024

Fixed by #43

@Redth Redth closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants