]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java
new transaction: remove account on right swipe too
[mobile-ledger.git] / 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;