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

Items disappear when using recyclerview with ItemTouchHelper for drag & drop using FlexboxLayoutManager #459

Open
muzammilhussnain14 opened this issue Sep 23, 2018 · 4 comments

Comments

@muzammilhussnain14
Copy link

I am trying to implement item reordering by drag and drop in a RecyclerView using FlexboxLayoutManager .
I attach ItemTouchHelper to my RecyclerView and than on function onItemMove I do following in my RecyclerView.AdapterImplementation

      override fun onMove(recyclerView: RecyclerView, fromVH: RecyclerView.ViewHolder, toVH: RecyclerView.ViewHolder){
        // swapping words in shuffled array
        Collections.swap(wordsShuffled, fromVH.adapterPosition, toVH.adapterPosition)
        // calling notify item moved to update UI
        notifyItemMoved(fromVH.adapterPosition, toVH.adapterPosition)
         //It messes up UI after notifyItemMoved some time few items disappear and sometime comeback in random order
    }

It messes up UI after notifyItemMoved some time few items disappear and sometime comeback in random order

@gregkorossy
Copy link

Any news about this?

@zhaocheng19940105
Copy link

FlexboxLayoutManager notifyItemMoved(startIndex, endIndex) Item disappears
Any news about this?

@zhaocheng19940105
Copy link

There is no reply to this question?

@navyifanr
Copy link

@muzammilhussnain14 Do you have some solution for this bug?

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

4 participants