]> git.ktnx.net Git - mobile-ledger.git/commitdiff
new transaction: remove account on right swipe too
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 29 Mar 2019 08:10:09 +0000 (10:10 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 29 Mar 2019 08:10:09 +0000 (10:10 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java

index 5a5a352c821ac0b5cb8e0a1396ae9d5f3c236a69..acfee9ef5143888f516f896225db01423618c02c 100644 (file)
@@ -202,8 +202,7 @@ public class NewTransactionActivity extends ProfileThemedActivity
     }
     private void hookSwipeListener(final TableRow row) {
         row.getChildAt(0).setOnTouchListener(new OnSwipeTouchListener(this) {
-            public void onSwipeLeft() {
-//                Log.d("swipe", "LEFT" + row.getId());
+            private void onSwipeAside() {
                 if (table.getChildCount() > 2) {
                     TableRow prev_row = (TableRow) table.getChildAt(table.indexOfChild(row) - 1);
                     TableRow next_row = (TableRow) table.getChildAt(table.indexOfChild(row) + 1);
@@ -237,6 +236,12 @@ public class NewTransactionActivity extends ProfileThemedActivity
                             Snackbar.LENGTH_LONG).setAction("Action", null).show();
                 }
             }
+            public void onSwipeLeft() {
+                onSwipeAside();
+            }
+            public void onSwipeRight() {
+                onSwipeAside();
+            }
             //            @Override
 //            public boolean performClick(View view, MotionEvent m) {
 //                return true;