Loading packages/SystemUI/res/layout/auth_biometric_contents.xml +7 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="@integer/biometric_dialog_text_gravity" android:singleLine="true" android:marqueeRepeatLimit="1" android:ellipsize="marquee" style="@style/TextAppearance.AuthCredential.Title"/> <TextView Loading @@ -28,13 +31,16 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="@integer/biometric_dialog_text_gravity" android:singleLine="true" android:marqueeRepeatLimit="1" android:ellipsize="marquee" style="@style/TextAppearance.AuthCredential.Subtitle"/> <TextView android:id="@+id/description" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="@integer/biometric_dialog_text_gravity" android:scrollbars ="vertical" style="@style/TextAppearance.AuthCredential.Description"/> <Space android:id="@+id/space_above_icon" Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java +7 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.text.TextUtils; import android.text.method.ScrollingMovementMethod; import android.util.AttributeSet; import android.util.Log; import android.view.View; Loading Loading @@ -706,6 +707,12 @@ public class AuthBiometricView extends LinearLayout { mTitleView.setText(mPromptInfo.getTitle()); //setSelected could make marguee work mTitleView.setSelected(true); mSubtitleView.setSelected(true); //make description view become scrollable mDescriptionView.setMovementMethod(new ScrollingMovementMethod()); if (isDeviceCredentialAllowed()) { final CharSequence credentialButtonText; @Utils.CredentialType final int credentialType = Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapter.java +21 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,9 @@ public class UdfpsDialogMeasureAdapter { child.measure( MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(clampedSpacerHeight, MeasureSpec.EXACTLY)); } else if (child.getId() == R.id.description) { //skip description view and compute later continue; } else { child.measure( MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY), Loading @@ -150,9 +153,27 @@ public class UdfpsDialogMeasureAdapter { } } //re-calculate the height of description View description = mView.findViewById(R.id.description); totalHeight += measureDescription(description, displayHeight, width, totalHeight); return new AuthDialog.LayoutParams(width, totalHeight); } private int measureDescription(View description, int displayHeight, int currWidth, int currHeight) { //description view should be measured in AuthBiometricFingerprintView#onMeasureInternal //so we could getMeasuredHeight in onMeasureInternalPortrait directly. int newHeight = description.getMeasuredHeight() + currHeight; int limit = (int) (displayHeight * 0.75); if (newHeight > limit) { description.measure( MeasureSpec.makeMeasureSpec(currWidth, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(limit - currHeight, MeasureSpec.EXACTLY)); } return description.getMeasuredHeight(); } @NonNull private AuthDialog.LayoutParams onMeasureInternalLandscape(int width, int height) { final WindowMetrics windowMetrics = mWindowManager.getMaximumWindowMetrics(); Loading Loading
packages/SystemUI/res/layout/auth_biometric_contents.xml +7 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="@integer/biometric_dialog_text_gravity" android:singleLine="true" android:marqueeRepeatLimit="1" android:ellipsize="marquee" style="@style/TextAppearance.AuthCredential.Title"/> <TextView Loading @@ -28,13 +31,16 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="@integer/biometric_dialog_text_gravity" android:singleLine="true" android:marqueeRepeatLimit="1" android:ellipsize="marquee" style="@style/TextAppearance.AuthCredential.Subtitle"/> <TextView android:id="@+id/description" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="@integer/biometric_dialog_text_gravity" android:scrollbars ="vertical" style="@style/TextAppearance.AuthCredential.Description"/> <Space android:id="@+id/space_above_icon" Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java +7 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.text.TextUtils; import android.text.method.ScrollingMovementMethod; import android.util.AttributeSet; import android.util.Log; import android.view.View; Loading Loading @@ -706,6 +707,12 @@ public class AuthBiometricView extends LinearLayout { mTitleView.setText(mPromptInfo.getTitle()); //setSelected could make marguee work mTitleView.setSelected(true); mSubtitleView.setSelected(true); //make description view become scrollable mDescriptionView.setMovementMethod(new ScrollingMovementMethod()); if (isDeviceCredentialAllowed()) { final CharSequence credentialButtonText; @Utils.CredentialType final int credentialType = Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapter.java +21 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,9 @@ public class UdfpsDialogMeasureAdapter { child.measure( MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(clampedSpacerHeight, MeasureSpec.EXACTLY)); } else if (child.getId() == R.id.description) { //skip description view and compute later continue; } else { child.measure( MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY), Loading @@ -150,9 +153,27 @@ public class UdfpsDialogMeasureAdapter { } } //re-calculate the height of description View description = mView.findViewById(R.id.description); totalHeight += measureDescription(description, displayHeight, width, totalHeight); return new AuthDialog.LayoutParams(width, totalHeight); } private int measureDescription(View description, int displayHeight, int currWidth, int currHeight) { //description view should be measured in AuthBiometricFingerprintView#onMeasureInternal //so we could getMeasuredHeight in onMeasureInternalPortrait directly. int newHeight = description.getMeasuredHeight() + currHeight; int limit = (int) (displayHeight * 0.75); if (newHeight > limit) { description.measure( MeasureSpec.makeMeasureSpec(currWidth, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(limit - currHeight, MeasureSpec.EXACTLY)); } return description.getMeasuredHeight(); } @NonNull private AuthDialog.LayoutParams onMeasureInternalLandscape(int width, int height) { final WindowMetrics windowMetrics = mWindowManager.getMaximumWindowMetrics(); Loading