diff options
author | stefan-niedermann <info@niedermann.it> | 2019-05-07 21:48:59 +0300 |
---|---|---|
committer | stefan-niedermann <info@niedermann.it> | 2019-05-07 21:48:59 +0300 |
commit | 5fcc05c681bf7049be24f6e87f6b3b5fa869dafd (patch) | |
tree | f2f8378e0386aa95120feea69302a3a050beeedd /app/src/main/java/it/niedermann/nextcloud/deck/ui/helper/dnd/CrossTabDragAndDrop.java | |
parent | 0d147a242c5e72ec8d6c5894bb6ab3da6c85811a (diff) |
added todos
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/helper/dnd/CrossTabDragAndDrop.java')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/helper/dnd/CrossTabDragAndDrop.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/helper/dnd/CrossTabDragAndDrop.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/helper/dnd/CrossTabDragAndDrop.java index 08f030c3c..71101c8f9 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/helper/dnd/CrossTabDragAndDrop.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/helper/dnd/CrossTabDragAndDrop.java @@ -38,7 +38,6 @@ public class CrossTabDragAndDrop { public void register(final MainActivity mainActivity, final ViewPager viewPager) { viewPager.setOnDragListener((View v, DragEvent dragEvent) -> { - DeckLog.log("--- Drag 'n' Drop: äckschn " + dragEvent.getAction() + ""); CardView cardView = (CardView) dragEvent.getLocalState(); @@ -62,6 +61,8 @@ public class CrossTabDragAndDrop { long now = System.currentTimeMillis(); if (lastSwap + msToReact < now) { // don't change Tabs so fast! if (dragEvent.getX() <= pxToReact) { + //TODO: this one depends on the initial view the drag started from. + // maybe we should search all tabs rather than only the source tab int oldCardPosition = recyclerView.getChildAdapterPosition(cardView); int oldTabPosition = viewPager.getCurrentItem(); DeckLog.log("--- Drag 'n' Drop: " + "Old Card index: " + oldCardPosition + " | Old Tab: " + oldTabPosition); @@ -173,6 +174,8 @@ public class CrossTabDragAndDrop { } break; case DragEvent.ACTION_DROP: + //todo: hier wird das alte auf visible gesetzt, hier muss analog oben die richtige card wieder rausgesucht werden. + // for (int i = 0; i < newrecyclerView1.getChildCount(); i++) { cardView.setVisibility(View.VISIBLE); break; } |