Use config_headlineFontFamily for password screens.
These screens are used whenever setting or confirming the lockscreen PIN or password. Set them to a consistent textSize (24sp) and a consistent fontFamily. Would have set the fontFamily in the style, but unfortunately setInputType is called on the TextViews after inflation which blows away the fontFamily. Instead, we set it in code right after that call. Change-Id: I77c3f94e2b1ce6d1f19697394c5caa09aac423b0 Fixes: 62873478 Test: manual
This commit is contained in:
@@ -76,7 +76,6 @@
|
|||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
|
android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textSize="16sp"
|
|
||||||
style="@style/TextAppearance.PasswordEntry"/>
|
style="@style/TextAppearance.PasswordEntry"/>
|
||||||
|
|
||||||
<TextView style="@style/TextAppearance.ConfirmDeviceCredentialsErrorText"
|
<TextView style="@style/TextAppearance.ConfirmDeviceCredentialsErrorText"
|
||||||
|
@@ -59,7 +59,6 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
android:imeOptions="actionNext|flagNoExtractUi|flagForceAscii"
|
android:imeOptions="actionNext|flagNoExtractUi|flagForceAscii"
|
||||||
android:textSize="24sp"
|
|
||||||
style="@style/TextAppearance.PasswordEntry"/>
|
style="@style/TextAppearance.PasswordEntry"/>
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
|
@@ -76,7 +76,6 @@
|
|||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
|
android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textSize="16sp"
|
|
||||||
style="@style/TextAppearance.PasswordEntry"/>
|
style="@style/TextAppearance.PasswordEntry"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@@ -54,7 +54,6 @@
|
|||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
|
android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textSize="16sp"
|
|
||||||
style="@style/TextAppearance.PasswordEntry"/>
|
style="@style/TextAppearance.PasswordEntry"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@@ -79,6 +79,7 @@
|
|||||||
<item name="android:gravity">center</item>
|
<item name="android:gravity">center</item>
|
||||||
<item name="android:singleLine">true</item>
|
<item name="android:singleLine">true</item>
|
||||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||||
|
<item name="android:textSize">24sp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="TextAppearance.CryptKeeper_PasswordEntry" parent="android:TextAppearance.Material">
|
<style name="TextAppearance.CryptKeeper_PasswordEntry" parent="android:TextAppearance.Material">
|
||||||
|
@@ -30,6 +30,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Resources.Theme;
|
import android.content.res.Resources.Theme;
|
||||||
import android.graphics.Insets;
|
import android.graphics.Insets;
|
||||||
|
import android.graphics.Typeface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
@@ -375,6 +376,10 @@ public class ChooseLockPassword extends SettingsActivity {
|
|||||||
int currentType = mPasswordEntry.getInputType();
|
int currentType = mPasswordEntry.getInputType();
|
||||||
mPasswordEntry.setInputType(mIsAlphaMode ? currentType
|
mPasswordEntry.setInputType(mIsAlphaMode ? currentType
|
||||||
: (InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD));
|
: (InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD));
|
||||||
|
// Can't set via XML since setInputType resets the fontFamily to null
|
||||||
|
mPasswordEntry.setTypeface(Typeface.create(
|
||||||
|
getContext().getString(com.android.internal.R.string.config_headlineFontFamily),
|
||||||
|
Typeface.NORMAL));
|
||||||
|
|
||||||
Intent intent = getActivity().getIntent();
|
Intent intent = getActivity().getIntent();
|
||||||
final boolean confirmCredentials = intent.getBooleanExtra(
|
final boolean confirmCredentials = intent.getBooleanExtra(
|
||||||
|
@@ -20,6 +20,7 @@ import android.app.Fragment;
|
|||||||
import android.app.admin.DevicePolicyManager;
|
import android.app.admin.DevicePolicyManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.graphics.Typeface;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.CountDownTimer;
|
import android.os.CountDownTimer;
|
||||||
@@ -172,6 +173,10 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
|||||||
int currentType = mPasswordEntry.getInputType();
|
int currentType = mPasswordEntry.getInputType();
|
||||||
mPasswordEntry.setInputType(mIsAlpha ? currentType
|
mPasswordEntry.setInputType(mIsAlpha ? currentType
|
||||||
: (InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD));
|
: (InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD));
|
||||||
|
// Can't set via XML since setInputType resets the fontFamily to null
|
||||||
|
mPasswordEntry.setTypeface(Typeface.create(
|
||||||
|
getContext().getString(com.android.internal.R.string.config_headlineFontFamily),
|
||||||
|
Typeface.NORMAL));
|
||||||
mAppearAnimationUtils = new AppearAnimationUtils(getContext(),
|
mAppearAnimationUtils = new AppearAnimationUtils(getContext(),
|
||||||
220, 2f /* translationScale */, 1f /* delayScale*/,
|
220, 2f /* translationScale */, 1f /* delayScale*/,
|
||||||
AnimationUtils.loadInterpolator(getContext(),
|
AnimationUtils.loadInterpolator(getContext(),
|
||||||
|
Reference in New Issue
Block a user