How to get a Floating Action Button over a scrollable webview in xamarin forms without using additional Nuhget packages?

Viewed 592

Fab.Forms package is not working jn my system. It requires target framework to be changed to .Net Framework from .Net standard. So is there any alternative way of getting a FAB over a webview that can be scrolled. The webview holds a website.

1 Answers

I think using grid is a simple way to put FAB on a view that can be scrolled.

This is a sample xaml:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>

    <WebView Grid.Row="0" Source="http://xamarin.com" />

    <Button Grid.Row="0" Text="☆" FontSize="Large" BorderColor="Black" BorderWidth="1" FontAttributes="Bold" BackgroundColor="OrangeRed" BorderRadius="35" TextColor="White"  WidthRequest="70" HeightRequest="70" Margin="0,0,20,22" HorizontalOptions="End" VerticalOptions="End"/>

</Grid>
Related