]> git.ktnx.net Git - mobile-ledger.git/commitdiff
remove unnecessary onLayoutChangeListener
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Tue, 9 Jun 2020 20:11:43 +0000 (20:11 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Tue, 9 Jun 2020 20:11:43 +0000 (20:11 +0000)
the new constraint layout implementation works just fine (it seems)

app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryAdapter.java

index 060828e746424e69f90f37704d469d30209cfbd8..b4064a80d262ea216f062da672f4bdd014e2c23d 100644 (file)
@@ -121,17 +121,6 @@ public class AccountSummaryAdapter
             this.accountExpanderContainer =
                     itemView.findViewById(R.id.account_row_amounts_expander_container);
 
-            expanderContainer.addOnLayoutChangeListener(
-                    (v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> {
-                        int w = right - left;
-                        int h = bottom - top;
-                        if (h > w) {
-                            int p = (h - w) / 2;
-                            v.setPadding(0, p, 0, p);
-                        }
-                        else v.setPadding(0, 0, 0, 0);
-                    });
-
             itemView.setOnLongClickListener(this::onItemLongClick);
             tvAccountName.setOnLongClickListener(this::onItemLongClick);
             tvAccountAmounts.setOnLongClickListener(this::onItemLongClick);