Oct 29, 2014 Replies: 31 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 SGV.apk 437.5 KB · Views: 1,414 Click to expand...
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.
Beja Expert Licensed User Longtime User Oct 30, 2014 #3 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?
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 Oct 30, 2014 #4 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.
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 Oct 30, 2014 #5 warwound said: Nice n smooth on this Tab3. Click to expand... Thanks man. Beja said: 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? Click to expand... 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. Beja said: 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. Click to expand... 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.
warwound said: Nice n smooth on this Tab3. Click to expand... Thanks man. Beja said: 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? Click to expand... 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. Beja said: 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. Click to expand... 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 Oct 30, 2014 #6 thedesolatesoul said: 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. Click to expand... 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.
thedesolatesoul said: 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. Click to expand... 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 Oct 30, 2014 #7 you just have to drag & drop the two items, one after the other Click to expand... 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?
you just have to drag & drop the two items, one after the other Click to expand... 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 Oct 30, 2014 #8 Beja said: Hi informatix, would you explain a little more.. Click to expand... Consider this sequence: 1 2 3 4 I can swap 1 and 4 by moving 1 at the end, then 4 at the beginning. Beja said: 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. Click to expand... 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?
Beja said: Hi informatix, would you explain a little more.. Click to expand... Consider this sequence: 1 2 3 4 I can swap 1 and 4 by moving 1 at the end, then 4 at the beginning. Beja said: 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. Click to expand... 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 Oct 30, 2014 #9 Beja said: 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? Click to expand... 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.
Beja said: 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? Click to expand... 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.
thedesolatesoul Expert Licensed User Longtime User Oct 30, 2014 #10 Uploaded a demo with a single column i.e. effectively a listview. Attachments SGV.apk SGV.apk 381.7 KB · Views: 1,007
E ernschd Active Member Licensed User Longtime User Dec 1, 2014 #11 Hi, great, the listview is what i'm looking for! Is there a library to download?
thedesolatesoul Expert Licensed User Longtime User Dec 1, 2014 #12 ernschd said: Hi, great, the listview is what i'm looking for! Is there a library to download? Click to expand... If you are looking for a LISTVIEW you should go for ULV. If you are looking for a GRIDVIEW then you might need this library.
ernschd said: Hi, great, the listview is what i'm looking for! Is there a library to download? Click to expand... If you are looking for a LISTVIEW you should go for ULV. If you are looking for a GRIDVIEW then you might need this library.
E ernschd Active Member Licensed User Longtime User Dec 1, 2014 #13 I'm looking for the Gridview, but i don't see the library.
thedesolatesoul Expert Licensed User Longtime User Dec 1, 2014 #14 ernschd said: I'm looking for the Gridview, but i don't see the library. Click to expand... 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 said: I'm looking for the Gridview, but i don't see the library. Click to expand... 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.
E ernschd Active Member Licensed User Longtime User Dec 1, 2014 #15 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.
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 Dec 1, 2014 #16 ernschd said: 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. Click to expand... Time...that elusive resource that nobody has... And unfortunately worse for you, no internet access
ernschd said: 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. Click to expand... Time...that elusive resource that nobody has... And unfortunately worse for you, no internet access
Bwana Member Licensed User Longtime User Feb 28, 2015 #17 When is GridView lib due to be released, is a way to obtain a prerelease?
thedesolatesoul Expert Licensed User Longtime User Feb 28, 2015 #18 If I were to be optimistic, next week. PM me, so I can remember to pre-release it to you incase i forget. I'll try to send it tonight to tomorrow.
If I were to be optimistic, next week. PM me, so I can remember to pre-release it to you incase i forget. I'll try to send it tonight to tomorrow.
Bwana Member Licensed User Longtime User Feb 28, 2015 #19 thedesolatesoul said: If I were to be optimistic, next week. PM me, so I can remember to pre-release it to you incase i forget. I'll try to send it tonight to tomorrow. Click to expand... Thanks thedesolatesoul I am looking forward ! /Berrahttps://www.b4x.com/android/forum/members/thedesolatesoul.11412/
thedesolatesoul said: If I were to be optimistic, next week. PM me, so I can remember to pre-release it to you incase i forget. I'll try to send it tonight to tomorrow. Click to expand... Thanks thedesolatesoul I am looking forward ! /Berrahttps://www.b4x.com/android/forum/members/thedesolatesoul.11412/
thedesolatesoul Expert Licensed User Longtime User Mar 1, 2015 #20 Bwana said: Thanks thedesolatesoul I am looking forward ! /Berra Click to expand... Sent!