Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using DraggableViewCell into CollectionView #87

Open
AmirImam opened this issue Oct 31, 2022 · 0 comments
Open

Error when using DraggableViewCell into CollectionView #87

AmirImam opened this issue Oct 31, 2022 · 0 comments

Comments

@AmirImam
Copy link

AmirImam commented Oct 31, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant