From: Damyan Ivanov Date: Fri, 29 Mar 2019 08:10:09 +0000 (+0200) Subject: new transaction: remove account on right swipe too X-Git-Tag: v0.9~43 X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=commitdiff_plain;h=db178636b20fb5d1b21bc60d5e7f169ea8f9d588;hp=16cbf6b19eb8dbf105b9b06dc73de4c01717e054 new transaction: remove account on right swipe too --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java index 5a5a352c..acfee9ef 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java @@ -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;