Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Commit

Permalink
Fix an issue that ScrollView truncates items when using StackLayout.
Browse files Browse the repository at this point in the history
  • Loading branch information
keiji committed Dec 7, 2021
1 parent 758c7f5 commit 718bf78
Show file tree
Hide file tree
Showing 18 changed files with 108 additions and 10 deletions.
6 changes: 6 additions & 0 deletions Covid19Radar/Covid19Radar/Views/HelpPage/HelpPage1.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
NavigationPage.HasNavigationBar="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<Grid Style="{StaticResource HelpPageGridLayout}">
<Grid.RowDefinitions>
Expand Down Expand Up @@ -67,4 +72,5 @@
</StackLayout>
</Grid>
</ScrollView>
</ContentView>
</ContentPage>
6 changes: 6 additions & 0 deletions Covid19Radar/Covid19Radar/Views/HelpPage/HelpPage2.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<Grid Style="{StaticResource HelpPageGridLayout}">
<Grid.RowDefinitions>
Expand Down Expand Up @@ -81,4 +86,5 @@
</StackLayout>
</Grid>
</ScrollView>
</ContentView>
</ContentPage>
6 changes: 6 additions & 0 deletions Covid19Radar/Covid19Radar/Views/HelpPage/HelpPage3.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<Grid Style="{StaticResource HelpPageGridLayout}" Margin="20">
<Grid.RowDefinitions>
Expand Down Expand Up @@ -148,4 +153,5 @@
</Grid>
</Grid>
</ScrollView>
</ContentView>
</ContentPage>
6 changes: 6 additions & 0 deletions Covid19Radar/Covid19Radar/Views/HelpPage/HelpPage4.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<Grid Style="{StaticResource HelpPageGridLayout}">
<Grid.RowDefinitions>
Expand All @@ -38,4 +43,5 @@
</Grid>
</Grid>
</ScrollView>
</ContentView>
</ContentPage>
6 changes: 6 additions & 0 deletions Covid19Radar/Covid19Radar/Views/HelpPage/InqueryPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<StackLayout
Padding="10"
Expand Down Expand Up @@ -69,4 +74,5 @@
<BoxView Style="{StaticResource DefaultLineStyle}" />
</StackLayout>
</ScrollView>
</ContentView>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Style="{StaticResource DefaultPageStyle}"
Title="{x:Static resources:AppResources.SendLogConfirmationPageTitle}"
Visual="Material">
<ContentPage.Content>
<ContentView>
<ScrollView
Margin="0"
Padding="0">
Expand Down Expand Up @@ -69,5 +69,5 @@
Text="{x:Static resources:AppResources.SendLogConfirmationPageButton1}" />
</StackLayout>
</ScrollView>
</ContentPage.Content>
</ContentView>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<StackLayout
Padding="10"
Expand Down Expand Up @@ -74,4 +79,5 @@
Text="{x:Static resources:AppResources.ContactedNotifyPageButton1}" />
</StackLayout>
</ScrollView>
</ContentView>
</ContentPage>
6 changes: 6 additions & 0 deletions Covid19Radar/Covid19Radar/Views/HomePage/HomePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
Text="{x:Static resources:AppResources.MainTutorial}" />
</ContentPage.ToolbarItems>

<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<StackLayout
Padding="15"
Expand Down Expand Up @@ -224,4 +229,5 @@
</StackLayout>
</StackLayout>
</ScrollView>
</ContentView>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<StackLayout
Spacing="16"
Expand Down Expand Up @@ -90,4 +95,5 @@
</Label>
</StackLayout>
</ScrollView>
</ContentView>
</ContentPage>
6 changes: 6 additions & 0 deletions Covid19Radar/Covid19Radar/Views/HomePage/NotContactPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<Grid Style="{StaticResource DefaultGridLayout}">
<Grid.RowDefinitions>
Expand Down Expand Up @@ -61,4 +66,5 @@
</Grid>
</Grid>
</ScrollView>
</ContentView>
</ContentPage>
18 changes: 10 additions & 8 deletions Covid19Radar/Covid19Radar/Views/HomePage/NotifyOtherPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<StackLayout
Padding="15,15,15,20">
Expand Down Expand Up @@ -51,13 +56,12 @@
<Label AutomationProperties.IsInAccessibleTree="{Binding IsVisibleWithSymptomsLayout}"
Style="{StaticResource DefaultLabel}"
Text="{x:Static resources:AppResources.NotifyOtherPageWithSymptomsDescription1}" />
<StackLayout Spacing="0"
Margin="0, 5, 0, 10">
<Frame Padding="0"
BackgroundColor="#CECECE"
CornerRadius="7"
HasShadow="False"
HorizontalOptions="FillAndExpand">
HorizontalOptions="FillAndExpand"
Margin="0, 5, 0, 10">
<Frame Margin="3"
Padding="0"
BackgroundColor="White"
Expand All @@ -71,19 +75,17 @@
</Frame>
</Frame>
</StackLayout>
</StackLayout>
<StackLayout Margin="0, 15, 0, 0"
IsVisible="{Binding IsVisibleNoSymptomsLayout}">
<Label AutomationProperties.IsInAccessibleTree="{Binding IsVisibleNoSymptomsLayout}"
Style="{StaticResource DefaultLabel}"
Text="{x:Static resources:AppResources.NotifyOtherPageNoSymptomsDescription1}" />
<StackLayout Spacing="0"
Margin="0, 5, 0, 10">
<Frame Padding="0"
BackgroundColor="#CECECE"
CornerRadius="7"
HasShadow="False"
HorizontalOptions="FillAndExpand">
HorizontalOptions="FillAndExpand"
Margin="0, 5, 0, 10">
<Frame Margin="3"
Padding="0"
BackgroundColor="White"
Expand All @@ -96,7 +98,6 @@
Date="{Binding DiagnosisDate}"/>
</Frame>
</Frame>
</StackLayout>
</StackLayout>
<Label
AutomationProperties.IsInAccessibleTree="True"
Expand Down Expand Up @@ -241,4 +242,5 @@
</Frame>
</StackLayout>
</ScrollView>
</ContentView>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
</DataTrigger>
</ContentPage.Triggers>

<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<Grid Style="{StaticResource DefaultGridLayout}">
<Grid.RowDefinitions>
Expand Down Expand Up @@ -130,4 +135,5 @@
</Grid>
</Grid>
</ScrollView>
</ContentView>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<Grid Style="{StaticResource DefaultGridLayout}">
<Grid.RowDefinitions>
Expand Down Expand Up @@ -51,4 +56,5 @@
</Grid>
</Grid>
</ScrollView>
</ContentView>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<StackLayout
Padding="20"
Expand Down Expand Up @@ -55,5 +60,6 @@
AutomationProperties.IsInAccessibleTree="True" />
</StackLayout>
</ScrollView>
</ContentView>
</ContentPage>

6 changes: 6 additions & 0 deletions Covid19Radar/Covid19Radar/Views/Settings/DebugPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<StackLayout
Padding="15"
Expand Down Expand Up @@ -227,4 +232,5 @@
</Frame>
</StackLayout>
</ScrollView>
</ContentView>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<StackLayout
Padding="0"
Expand Down Expand Up @@ -145,4 +150,5 @@
VerticalOptions="Start" />
</StackLayout>
</ScrollView>
</ContentView>
</ContentPage>
6 changes: 6 additions & 0 deletions Covid19Radar/Covid19Radar/Views/Settings/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<StackLayout
Padding="0"
Expand Down Expand Up @@ -108,4 +113,5 @@
</Frame>
</StackLayout>
</ScrollView>
</ContentView>
</ContentPage>
6 changes: 6 additions & 0 deletions Covid19Radar/Covid19Radar/Views/Tutorial/TutorialPage6.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Visual="Material">
<!--
Workaround for fixing ScrollView truncates items issue.
https://github.com/xamarin/Xamarin.Forms/issues/13597
-->
<ContentView>
<ScrollView>
<Grid Margin="20" Style="{StaticResource DefaultGridLayout}">
<Grid.RowDefinitions>
Expand Down Expand Up @@ -69,4 +74,5 @@
</StackLayout>
</Grid>
</ScrollView>
</ContentView>
</ContentPage>

0 comments on commit 718bf78

Please sign in to comment.