Hey everyone, I am trying to add a ScrollView inside a Grid Layout. But unfortunately on Android it doesn't seem to be working, as in the stack layout with the button doesn't get scrolled. I'm not sure what I'm doing wrong here. Image may be NSFW.
Clik here to view. If anyone could help out with this issue, would mean a lot.
Thanks. Image may be NSFW.
Clik here to view.
WebView webView = new WebView
{
Source = new UrlWebViewSource
{
Url = "http://www.google.com/",
},
VerticalOptions = LayoutOptions.FillAndExpand,
};
ScrollView scrollViewButtons = new ScrollView { Orientation = ScrollOrientation.Vertical, Padding = new Thickness(0,0,0,0)};
Grid grid = new Grid
{
VerticalOptions = LayoutOptions.FillAndExpand,
HorizontalOptions = LayoutOptions.FillAndExpand,
RowDefinitions =
{
new RowDefinition { Height = GridLength.Auto },
new RowDefinition { Height = new GridLength(1, GridUnitType.Star) },
},
ColumnDefinitions =
{
new ColumnDefinition { Width = GridLength.Auto },
new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) },
}
};
grid.Children.Add(webView, 0, 1);
StackLayout stackLayoutButtons = new StackLayout
{
Children = { btn_AddToCart, btn_AddToWishList, btn_MakeAnOffer },
Spacing = Device.OnPlatform(2, 3, 1),
Padding = 0,
Orientation = StackOrientation.Vertical,
VerticalOptions = LayoutOptions.FillAndExpand,
HorizontalOptions = LayoutOptions.FillAndExpand,
};
scrollViewButtons.Content = stackLayoutButtons;
grid.Children.Add(scrollViewButtons, 0, 2);
this.Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 5, 5);
this.Content = grid;