Error when using DraggableViewCell into CollectionView
Opened this issue · 0 comments
AmirImam commented
H
I have an error that appears when I try to display a DraggableViewCell into a CollectionView
The error is:
Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()' on a null object reference
Sharpnado.CollectionView 2.1.0
Xamarin.Forms 5.0.0.2515
Xaml Code:
<StackLayout>
<sho:CollectionView
x:Name="Collector"
EnableDragAndDrop="True"
ItemHeight="140"
ItemSpacing="20"
ItemsSource="{Binding DesiresList}"
VerticalOptions="FillAndExpand">
<sho:CollectionView.ItemTemplate>
<DataTemplate>
<sho:DraggableViewCell IsDragAndDropping="True" IsDraggable="True">
<ContentView>
<StackLayout>
<Label Text="{Binding Name}" />
</StackLayout>
</ContentView>
</sho:DraggableViewCell>
</DataTemplate>
</sho:CollectionView.ItemTemplate>
</sho:CollectionView>
</StackLayout>
Note:
The library works fine when I create a new empty project, but this error appeared when I try to run it on the existing project, and
There are a lot of libraries that already installed on this project.
Update:
This error appearing now
Cannot invalidate item decorations during a scroll or layout
Nothing changed, just this error appeared instead of the previous one