Remove icon vertical padding from small dialog height calculation

The vertical padding is only used to create space between the icon
and the other elements in "medium" dialog mode.

Fixes: 143979408

Test: BiometricPromptDemo
Change-Id: I2598cce2fb6a5ab58b94035e9f2190e4915af136
This commit is contained in:
Kevin Chyn
2019-11-05 15:59:58 -08:00
parent e181b8d9a0
commit 9a8209c016

View File

@@ -298,7 +298,10 @@ public abstract class AuthBiometricView extends LinearLayout {
.getDimension(R.dimen.biometric_dialog_icon_padding);
mIconView.setY(getHeight() - mIconView.getHeight() - iconPadding);
final int newHeight = mIconView.getHeight() + 2 * (int) iconPadding;
// Subtract the vertical padding from the new height since it's only used to create
// extra space between the other elements, and not part of the actual icon.
final int newHeight = mIconView.getHeight() + 2 * (int) iconPadding
- mIconView.getPaddingTop() - mIconView.getPaddingBottom();
mPanelController.updateForContentDimensions(mMediumWidth, newHeight,
0 /* animateDurationMs */);