From: Damyan Ivanov Date: Tue, 9 Jun 2020 20:11:43 +0000 (+0000) Subject: remove unnecessary onLayoutChangeListener X-Git-Tag: v0.14.0~46 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=74265675974e0e029510cd33906b6c51163d40ba;p=mobile-ledger.git remove unnecessary onLayoutChangeListener the new constraint layout implementation works just fine (it seems) --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryAdapter.java b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryAdapter.java index 060828e7..b4064a80 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryAdapter.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryAdapter.java @@ -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);