/** Set paddings to the correct values */ private void correctPaddings() { int buttonsWidthLeft = 0, buttonsWidthRight = 0; int buttonsWidth = iconOuterWidth * getButtonsCount(); if (isRTL()) { buttonsWidthLeft = buttonsWidth; } else { buttonsWidthRight = buttonsWidth; } super.setPadding( innerPaddingLeft + extraPaddingLeft + buttonsWidthLeft, innerPaddingTop + extraPaddingTop, innerPaddingRight + extraPaddingRight + buttonsWidthRight, innerPaddingBottom + extraPaddingBottom); }
/** * use {@link #setPaddings(int, int, int, int)} instead, or the paddingTop and the paddingBottom * may be set incorrectly. */ @Deprecated @Override public final void setPadding(int left, int top, int right, int bottom) { super.setPadding(left, top, right, bottom); }