Commit 096d998a authored by Friedrich Horschig's avatar Friedrich Horschig Committed by Commit Bot

[PwdCheckAndroid] Add hint to editing page

This CL adds a hint string that advises users to match stored with
actually used passwords.
The string will be used on different editing surfaces (e.g. pwd check
and pwd editing from settings). This location also simplifies visibility
constraints due to modularization.

Translation screenshot for IDS_PASSWORD_EDIT_HINT:
https://storage.cloud.google.com/chromium-translation-screenshots/836fe6204aa775e50fa379738191cf32dd4f4f71

Bug: 1119424, 1092444
Change-Id: Iaf44a9a0b719545ecbbf43b28314de18bf51f703
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2364636Reviewed-by: default avatarIoana Pandele <ioanap@chromium.org>
Commit-Queue: Friedrich [CET] <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800044}
parent 5b94bd87
...@@ -104,4 +104,11 @@ ...@@ -104,4 +104,11 @@
</LinearLayout> </LinearLayout>
<TextView
android:id="@+id/edit_hint"
android:layout_marginTop="@dimen/password_entry_editor_field_top_margin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.TextSmall.Secondary"/>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -18,6 +18,7 @@ import android.view.ViewGroup; ...@@ -18,6 +18,7 @@ import android.view.ViewGroup;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
...@@ -79,6 +80,9 @@ public class PasswordCheckEditFragmentView extends PreferenceFragmentCompat { ...@@ -79,6 +80,9 @@ public class PasswordCheckEditFragmentView extends PreferenceFragmentCompat {
mNewPassword = getNewPasswordFromInstanceStateOrLaunchBundle(savedInstanceState); mNewPassword = getNewPasswordFromInstanceStateOrLaunchBundle(savedInstanceState);
mPasswordVisible = getViewButtonPressedFromInstanceState(savedInstanceState); mPasswordVisible = getViewButtonPressedFromInstanceState(savedInstanceState);
TextView hintText = view.findViewById(R.id.edit_hint);
hintText.setText(getString(R.string.password_edit_hint, mCredential.getDisplayOrigin()));
EditText siteText = (EditText) view.findViewById(R.id.site_edit); EditText siteText = (EditText) view.findViewById(R.id.site_edit);
siteText.setText(mCredential.getDisplayOrigin()); siteText.setText(mCredential.getDisplayOrigin());
......
...@@ -511,6 +511,9 @@ CHAR-LIMIT guidelines: ...@@ -511,6 +511,9 @@ CHAR-LIMIT guidelines:
<message name="IDS_PASSWORD_NO_RESULT" desc="Text when a password search returned no results."> <message name="IDS_PASSWORD_NO_RESULT" desc="Text when a password search returned no results.">
Can’t find that password. Check your spelling and try again. Can’t find that password. Check your spelling and try again.
</message> </message>
<message name="IDS_PASSWORD_EDIT_HINT" desc="Small hint on the editing screens that advises users to store the same password as they use on the currently edited site.">
Make sure the password you are saving matches your password for <ph name="SITE">%1$s<ex>example.com</ex></ph>
</message>
<message name="IDS_PASSWORD_ENTRY_VIEWER_TITLE" desc='Title of the overview screen for a saved password.'> <message name="IDS_PASSWORD_ENTRY_VIEWER_TITLE" desc='Title of the overview screen for a saved password.'>
Saved password Saved password
</message> </message>
......
836fe6204aa775e50fa379738191cf32dd4f4f71
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment