roubachof/Sharpnado.CollectionView

Vertical ListView only works if ItemWidth is set

Closed this issue · 3 comments

Platform:

  • OS: [Android]
  • Device: Emulator (Android 9) and Galaxy S8 (Android 9)
  • Sdk vervion: Android 9
  • Xamarin.Forms: 4.8.0.1821

Describe the bug
The App crashes/hangs if ListLayout is set to Vertical and no ItemWidth is set or ItemWitdh is set to 0.
Setting an ItemWitdh > 0 fixes the problem.

To Reproduce
Steps to reproduce the behavior:
Create a HorizontalListView and set ListLayout to Vertical and dont set an ItemWitdh

Exceptions (if applicable)

No Exception is thrown, the App just hangs until you restart it.

Screenshots (if applicable)
If applicable, add screenshots to help explain your problem.

<sho:HorizontalListView x:Name="HLV" VerticalOptions="FillAndExpand" CollectionPadding="5,5,5,5" 
                EnableDragAndDrop="True" ItemHeight="60" ItemsSource="{Binding Exercises}" ListLayout="Vertical" >
                     <sho:HorizontalListView.ItemTemplate>
                     <DataTemplate>
                         <sho:DraggableViewCell x:Name="DraggableViewCell" IsDraggable="True" >
                             <ContentView >
                                 
                             </ContentView>
                         </sho:DraggableViewCell>
                     </DataTemplate>
                 </sho:HorizontalListView.ItemTemplate>
             </sho:HorizontalListView>

+1 here

Unfortunately I couldn't replicate with the sample project and:

 <sho:HorizontalListView
                        x:Name="HorizontalListView"
                        CollectionPadding="10,30,10,75"
                        CurrentIndex="{Binding CurrentIndex}"
                        DragAndDropTrigger="Pan"
                        EnableDragAndDrop="{Binding Source={x:Reference DragAndDropSwitch}, Path=IsToggled}"
                        InfiniteListLoader="{Binding SillyPeoplePaginator}"
                        ItemHeight="120"
                        ItemTemplate="{StaticResource DudeTemplateSelector}"
                        ItemsSource="{Binding SillyPeople}"
                        ListLayout="Vertical"
                        ScrollBeganCommand="{Binding OnScrollBeginCommand}"
                        ScrollEndedCommand="{Binding OnScrollEndCommand}"
                        TapCommand="{Binding TapCommand}" />

please give me a repro sample, a new version is coming and I would like to go to the bottom of this...