Skip to content

Error when using DraggableViewCell into CollectionView #87

@AmirImam

Description

@AmirImam

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions