+ this.expanderContainer = itemView.findViewById(R.id.account_expander_container);
+ this.expander = itemView.findViewById(R.id.account_expander);
+
+ 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);
+ });