Loading packages/SystemUI/res-keyguard/values-land/dimens.xml 0 → 100644 +29 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 2021, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <resources> <dimen name="num_pad_row_margin_bottom">3dp</dimen> <dimen name="keyguard_eca_top_margin">0dp</dimen> <dimen name="keyguard_eca_bottom_margin">2dp</dimen> <dimen name="keyguard_password_height">26dp</dimen> <dimen name="num_pad_entry_row_margin_bottom">0dp</dimen> <!-- The size of PIN text in the PIN unlock method. --> <integer name="scaled_password_text_size">26</integer> </resources> packages/SystemUI/res-keyguard/values-sw360dp-land/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -23,4 +23,7 @@ <dimen name="keyguard_eca_bottom_margin">4dp</dimen> <dimen name="keyguard_password_height">50dp</dimen> <dimen name="num_pad_entry_row_margin_bottom">4dp</dimen> <!-- The size of PIN text in the PIN unlock method. --> <integer name="scaled_password_text_size">40</integer> </resources> packages/SystemUI/src/com/android/keyguard/PasswordTextView.java +9 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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<CharState> mTextChars = new ArrayList<>(); private String mText = ""; Loading Loading @@ -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( Loading @@ -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(); Loading Loading
packages/SystemUI/res-keyguard/values-land/dimens.xml 0 → 100644 +29 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 2021, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <resources> <dimen name="num_pad_row_margin_bottom">3dp</dimen> <dimen name="keyguard_eca_top_margin">0dp</dimen> <dimen name="keyguard_eca_bottom_margin">2dp</dimen> <dimen name="keyguard_password_height">26dp</dimen> <dimen name="num_pad_entry_row_margin_bottom">0dp</dimen> <!-- The size of PIN text in the PIN unlock method. --> <integer name="scaled_password_text_size">26</integer> </resources>
packages/SystemUI/res-keyguard/values-sw360dp-land/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -23,4 +23,7 @@ <dimen name="keyguard_eca_bottom_margin">4dp</dimen> <dimen name="keyguard_password_height">50dp</dimen> <dimen name="num_pad_entry_row_margin_bottom">4dp</dimen> <!-- The size of PIN text in the PIN unlock method. --> <integer name="scaled_password_text_size">40</integer> </resources>
packages/SystemUI/src/com/android/keyguard/PasswordTextView.java +9 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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<CharState> mTextChars = new ArrayList<>(); private String mText = ""; Loading Loading @@ -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( Loading @@ -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(); Loading