Share My Creation Drag and Drop GridView

Looking for bugs and suggestions for a new library I ported, the DynamicGridView.
Allows dragging and dropping.

It can be used as a usual gridview and also has the ability to move around objects (try long clicking an item).

This borrows heavily from the work others have done: Erel's B4A, warwounds' BaseAdapter, Informatix's ULV, and askerov for the DynamicGridView.
 

Attachments

  • SGV.apk
    437.5 KB · Views: 842

Beja

Expert
Licensed User
Longtime User
thedesolatesoul,
that's great and I like the animation.. Samsung SGH-T599N - Android 4.1.2
I have one wish though!
Swapping 2 cells should not cause the rearrangement of the other cells.. I mean if I wanted to swap 2 and 6, then only cells 2 and 6 should be affected.. other cells should keep their positions.

Is that possible at this advanced stage?
 

Beja

Expert
Licensed User
Longtime User
Edit #3
When I click on the phone back key to exit, I get another screen, but there is no click or long-click event fired. just scrolling up and down.
 

thedesolatesoul

Expert
Licensed User
Longtime User
Nice n smooth on this Tab3.
Thanks man.

thedesolatesoul,
that's great and I like the animation.. Samsung SGH-T599N - Android 4.1.2
I have one wish though!
Swapping 2 cells should not cause the rearrangement of the other cells.. I mean if I wanted to swap 2 and 6, then only cells 2 and 6 should be affected.. other cells should keep their positions.

Is that possible at this advanced stage?
I'll have a look at it, but it looks quite difficult. The whole gridview is written around these cell reordering. Swapping would mean not to do reordering and just do one final animation onDrop.

Edit #3
When I click on the phone back key to exit, I get another screen, but there is no click or long-click event fired. just scrolling up and down.
Yes this is a different kind of grid called the StaggeredGridView with different sized items. I was wondering if i can port the drag/drop functionality to it, but that is looking difficult too as it uses and ExtendableListView instead of a GridView.
 

Informatix

Expert
Licensed User
Longtime User
I'll have a look at it, but it looks quite difficult. The whole gridview is written around these cell reordering. Swapping would mean not to do reordering and just do one final animation onDrop.
For me, a swap with an animation at the end, as Beja suggested, has less practical uses than the current behavior and, above all, the current behavior does not prevent to swap two items (you just have to drag & drop the two items, one after the other) while the swap mode does not allow to reorder easily a list (because a move will always affect two items). And of course, having both modes at the same time is not possible.
 

Beja

Expert
Licensed User
Longtime User
you just have to drag & drop the two items, one after the other
Hi informatix,
would you explain a little more..
the problem I am talking about is, in real application, a cell that's intended to be "Sales amount" could end up in the "First name" column.
I was expecting that, if this is a data grid, then the lib should first prevent raw cell swapping all together (unless the headers are also swapped), and column swapping should affect only the subject cells.
What do you think?
 

Informatix

Expert
Licensed User
Longtime User
Hi informatix,
would you explain a little more..
Consider this sequence: 1 2 3 4
I can swap 1 and 4 by moving 1 at the end, then 4 at the beginning.

the problem I am talking about is, in real application, a cell that's intended to be "Sales amount" could end up in the "First name" column.
It depends if you consider that's a GridView (so there's no column; I mean columns are just there to separate items, they don't regroup them under a header) or a ListView (with columns). But even in a ListView, you won't swap individual cells, but rows.
Do you have a concrete example?
 

thedesolatesoul

Expert
Licensed User
Longtime User
the problem I am talking about is, in real application, a cell that's intended to be "Sales amount" could end up in the "First name" column.
I was expecting that, if this is a data grid, then the lib should first prevent raw cell swapping all together (unless the headers are also swapped), and column swapping should affect only the subject cells.
What do you think?
I think this isnt the use for this kind of GridView.
Atleast this GridView assumes all Items are equal, not grouped. While it is possible to use it as a DataGrid, it is probably not the best way.
If you want your data to be grouped together you can use a listview or the gridview (with one column) and build the whole row in one cell.
 

ernschd

Active Member
Licensed User
Longtime User
Hi,
great, the listview is what i'm looking for! :)
Is there a library to download?
 

thedesolatesoul

Expert
Licensed User
Longtime User
I'm looking for the Gridview, but i don't see the library. :confused:
True, its not released into the wild yet.
I was hoping to write a sample to showcase its abilities, then one thing led to another, and now I dont see if happening soon due to so many things stuck in the pipeline.
If you want to expedite the process, maybe you can help if you have any graphics abilities, or incentivise in an alternative manner.
 

ernschd

Active Member
Licensed User
Longtime User
Well, thats comprehensible.
Sure i would like to offer my help, but unfortunately i have no time neither at work nor at home (and no internet access @home :()
Maybe later. Thank you anyway.
 

thedesolatesoul

Expert
Licensed User
Longtime User
Well, thats comprehensible.
Sure i would like to offer my help, but unfortunately i have no time neither at work nor at home (and no internet access @home :()
Maybe later. Thank you anyway.
Time...that elusive resource that nobody has...
And unfortunately worse for you, no internet access :(
 

Bwana

Member
Licensed User
Longtime User
When is GridView lib due to be released, is a way to obtain a prerelease? :)
 
Top