We could use FlexLayout for the phone's view, but because we want our user experience to be as good as possible, we will use CollectionView instead. To get the headers for each day, we will use grouping for CollectionView. For FlexLayout, we had ScrollView, but for CollectionView, we don't need this because CollectionView can handle scrolling by default.
Let's continue creating the user interface for the phone's view:
- In the Weather project, open the MainView_Phone.xaml file.
- Add a CollectionView to the root of the page.
- Set a binding to the Days property in MainViewModel for the ItemSource property.
- Set IsGrouped to True to enable grouping in CollectionView.
- Set BackgroundColor to Transparent, as shown in the following code:
<CollectionView ItemsSource="{Binding Days}" IsGrouped="True"
BackgroundColor="Transparent">
</CollectionView...