11 comments on “Re-Order ListView Items with Drag & Drop – II

  1. Can, nice job. But I think you are missing something within the implementation of method “InsertOntoView()”.

    Like

  2. Pingback: Dew Drop - March 19, 2018 (#2686) - Morning Dew

  3. Hey Can… thanks for these posts. Do you think it would be possible for you to have all the classes and interfaces in one ZIP file for us to download?

    I am stuck on the DragItem class where I currently can’t figure out where _element, _translatedItems and _listView is coming from.

    Thanks!

    Like

  4. Hi, I have two Listviews in a same Content page. Both with your drag drop support enabled. Top list has 2 items and bottom list has 5 items. When I drag, say item 4 from bottom list and drop it into index 2 of same listview it blows up because it thinks I’m dropping the item into top view list and indexes are out of bounds. Should your implementation support multiple ListViews in same page? Thanks

    Like

  5. @Can Bilgin, sorry, I can’t edit my previous comment. This is working great in Nexus 9 (Android 7.1.1), but for device Samsung Galaxy Note5 (Android 5.1.1), drag is working, but when I drop it is disappeared.I felt that this problem was due to Startdraganddrop() method incompatibility in OnItemLongClick event handler for devices later than Android API 24 as you mentioned. So, I used an if-else to use startdrag for android versions earlier than API 24 to use startdrag() and versions later than API 24 to use startdraganddrop() method, still the item disappears on dropping in Note 5. Any help would be appreciated, thanks in advance. NOTE: the other change I made in the code you have posted here was : _listAdapter = _listView.Adapter; instead of _listAdapter = ((AWidget.IWrapperListAdapter)_listView.Adapter).WrappedAdapter; I got “Specified cast is invalid” error, so I put without casting, is this the problem? Kindly help. Thanks again

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s