Merge "Fix the Fingerprint enrollment page's title text creates a truncate problem when it needs three lines on the R4 device" into udc-dev am: 9522a44bb6 am: 9b94df1d40

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/21478828

Change-Id: Ib0f3de4392a5f7fbf64aa405699358a34b3976dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jason Chang
2023-03-18 15:16:55 +00:00
committed by Automerger Merge Worker
3 changed files with 94 additions and 0 deletions

View File

@@ -63,6 +63,7 @@ import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
@@ -328,6 +329,23 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
final ViewGroup.LayoutParams containerLp =
portraitLayoutContainer.getLayoutParams();
containerLp.height = 0;
// In the portrait mode, the title and lottie animation view may
// overlap when title needs three lines, so adding some paddings
// between them, and adjusting the fp progress view here accordingly.
final int layoutLottieAnimationPadding = (int) getResources()
.getDimension(R.dimen.udfps_lottie_padding_top);
portraitLayoutContainer.setPadding(0,
layoutLottieAnimationPadding, 0, 0);
final ImageView progressView = udfpsEnrollView.findViewById(
R.id.udfps_enroll_animation_fp_progress_view);
progressView.setPadding(0, -(layoutLottieAnimationPadding),
0, layoutLottieAnimationPadding);
final ImageView fingerprintView = udfpsEnrollView.findViewById(
R.id.udfps_enroll_animation_fp_view);
fingerprintView.setPadding(0, -layoutLottieAnimationPadding,
0, layoutLottieAnimationPadding);
portraitLayoutContainer.addView(udfpsEnrollView);
setOnHoverListener(false, defaultLayout, udfpsEnrollView);
} else if (rotation == Surface.ROTATION_270) {