diff --git a/packages/SystemUI/res-keyguard/values-land/dimens.xml b/packages/SystemUI/res-keyguard/values-land/dimens.xml new file mode 100644 index 0000000000000..6342b9c0c7f0b --- /dev/null +++ b/packages/SystemUI/res-keyguard/values-land/dimens.xml @@ -0,0 +1,29 @@ + + + + 3dp + 0dp + 2dp + 26dp + 0dp + + + 26 + diff --git a/packages/SystemUI/res-keyguard/values-sw360dp-land/dimens.xml b/packages/SystemUI/res-keyguard/values-sw360dp-land/dimens.xml index eb5843b5a1b7c..f465be4f5228a 100644 --- a/packages/SystemUI/res-keyguard/values-sw360dp-land/dimens.xml +++ b/packages/SystemUI/res-keyguard/values-sw360dp-land/dimens.xml @@ -23,4 +23,7 @@ 4dp 50dp 4dp + + + 40 diff --git a/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java b/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java index b80f8bd64dcf6..b1597144d2376 100644 --- a/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java +++ b/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java @@ -21,6 +21,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ValueAnimator; import android.content.Context; +import android.content.res.Configuration; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Color; @@ -87,7 +88,7 @@ public class PasswordTextView extends View { /** * The raw text size, will be multiplied by the scaled density when drawn */ - private final int mTextHeightRaw; + private int mTextHeightRaw; private final int mGravity; private ArrayList mTextChars = new ArrayList<>(); private String mText = ""; @@ -147,6 +148,7 @@ public class PasswordTextView extends View { } finally { a.recycle(); } + mDrawPaint.setFlags(Paint.SUBPIXEL_TEXT_FLAG | Paint.ANTI_ALIAS_FLAG); mDrawPaint.setTextAlign(Paint.Align.CENTER); mDrawPaint.setTypeface(Typeface.create( @@ -163,6 +165,12 @@ public class PasswordTextView extends View { mPM = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); } + @Override + protected void onConfigurationChanged(Configuration newConfig) { + mTextHeightRaw = getContext().getResources().getInteger( + R.integer.scaled_password_text_size); + } + @Override protected void onDraw(Canvas canvas) { float totalDrawingWidth = getDrawingWidth();