Drag and drop Reorder in Recycler View | Android

Drag and drop Reorder in Recycler View | Android

Mafia Codes

4 года назад

32,069 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Guido Bertelli
Guido Bertelli - 23.06.2023 21:24

Hello, thanks for the great video but unfortunately it solved just an half of my problem. My recViews are connected to a realtime Firebase Database and I would like to implement the changes in position (swapping) also in the database so that those changes are then kind of permanent and they do not disappear when I exit the activity.
Thanks in advance for your help and God bless u

Ответить
Menahem Amar
Menahem Amar - 16.04.2023 19:36

The SWAP operation is not correct. Let's say I have a list of 3 elements [A,B,C] and the user moved the item from position 2 (C) to position 0 very quickly that the onMove() method was called only once when fromPosition=2 and toPosition=0 (It happened to me) then the updated list should be [C,A,B] and not [C,B,A] as the SWAP operation does

Ответить
Sumit Singh
Sumit Singh - 02.04.2023 18:06

Can you please help , in Drag and Drop for child items having different sizes.

I am using StaggeredGridLayoutManager.

Drag and Drop is working fine. But during Drag of Big items leads to Items duplication in RecyclerView background.

Ответить
Никита Мордвинцев
Никита Мордвинцев - 07.02.2023 12:33

thx

Ответить
Vinit Grover
Vinit Grover - 31.01.2023 08:41

Thanks

Ответить
MOHAMMAD NOOR HOSSAIN
MOHAMMAD NOOR HOSSAIN - 11.01.2023 21:21

Thanks a lot! Short, simple, working and exactly what I was searching And Struggle For eight hours !

Ответить
은혜
은혜 - 26.12.2022 21:11

hi i am getting error " java.lang.IndexOutOfBoundsException: Index: 5, Size: 0" on collections.swap. my data is from firestore. can u help me?

Ответить
Giddy Show
Giddy Show - 12.11.2022 15:01

Как мне двигать кнопки в LinearLayout?

Ответить
الطالب العراقي
الطالب العراقي - 16.09.2022 10:03

🌹🌹🌹

Ответить
D-News
D-News - 17.04.2022 11:44

Thank you, helped!

Ответить
Visitante 123
Visitante 123 - 22.03.2022 18:35

And SQLite record position of this RecyclerView, i not searching video in you tube? with use of the onLongClickListener?

Ответить
Empire Good
Empire Good - 18.03.2022 19:03

And SharefPreference in Drag in Drog of the RecyclerView?

Ответить
Dimitri Kravtsov
Dimitri Kravtsov - 29.12.2021 22:52

Really helpful!

Ответить
Mohammed Alsadoon
Mohammed Alsadoon - 12.12.2021 13:31

Thanks a lot! Short, simple, working and exactly what I was searching for.

Ответить
Gaurav Parmar
Gaurav Parmar - 19.11.2021 08:02

@yourtruly there is a position like 0,1,2,3,4,5 on the listing. Can you suggest to me how I can update that position as well?

Ответить
Game Logger
Game Logger - 03.10.2021 00:12

thank you for this short and very useful vidoe

Ответить
Visitante 123
Visitante 123 - 15.09.2021 18:27

Congratulations on the content, but if I quit sort a list down, if I quit the activity, is the reordering saved? I don't think so, I never see these videos in their entirety. What to do to try to follow your channel, will you complete the rest of the video?

Ответить
Yongky Martindo
Yongky Martindo - 20.08.2021 21:15

still relevant in 2021 thanks..

Ответить
Source Code
Source Code - 12.08.2021 21:26

Excellent tutorial, very well explained and demonstrated. Thanks. Love from England ❤️

Ответить
Abhijit Pani
Abhijit Pani - 04.08.2021 16:26

You have a good keyboard :-)

Ответить