Updates the hide and reveal password icons to use and tint the mozac version.

fennec/nightly
Kadeem 4 years ago committed by Jeff Boek
parent 6b2bf2acb8
commit 321251c49c

@ -78,12 +78,12 @@ class SavedLoginSiteInfoFragment : Fragment(R.layout.fragment_saved_login_site_i
private fun togglePasswordReveal() {
if (passwordInfoText.inputType == InputType.TYPE_TEXT_VARIATION_PASSWORD or InputType.TYPE_CLASS_TEXT) {
context?.components?.analytics?.metrics?.track(Event.ViewLoginPassword)
revealPasswordItem.setImageDrawable(context?.getDrawable(R.drawable.ic_password_hide))
revealPasswordItem.setImageDrawable(context?.getDrawable(R.drawable.mozac_ic_password_hide))
passwordInfoText.inputType = InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
revealPasswordItem.contentDescription =
context?.getString(R.string.saved_login_hide_password)
} else {
revealPasswordItem.setImageDrawable(context?.getDrawable(R.drawable.ic_password_reveal))
revealPasswordItem.setImageDrawable(context?.getDrawable(R.drawable.mozac_ic_password_reveal))
passwordInfoText.inputType =
InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_PASSWORD
revealPasswordItem.contentDescription =

@ -1,15 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"
xmlns:tools="http://schemas.android.com/tools"
android:viewportWidth="16"
android:viewportHeight="14"
android:width="16dp"
android:height="14dp">
<group
android:translateY="-1">
<path
android:pathData="M13.293 1.293C13.6834999 0.902618062 14.3165001 0.902618062 14.707 1.293C15.0973819 1.68349985 15.0973819 2.31650015 14.707 2.707L14.707 2.707L2.707 14.707C2.45592553 14.9669566 2.08412211 15.0712126 1.73449268 14.9796972C1.38486324 14.8881817 1.11181828 14.6151368 1.02030284 14.2655073C0.928787403 13.9158779 1.03304342 13.5440745 1.293 13.293L1.293 13.293L2.577 12.006C1.3903768 11.0408576 0.510547282 9.75099696 0.045 8.294C-0.0151633613 8.10057024 -0.0151633613 7.89342976 0.045 7.7C0.814048776 5.40667773 2.53923697 3.55919642 4.77460359 2.6351298C7.00997022 1.71106319 9.53610415 1.8011125 11.7 2.882L11.7 2.882L13.293 1.293ZM14.235 4.762C15.0172191 5.60307515 15.6044781 6.60619539 15.955 7.7C16.0164144 7.89528534 16.0164144 8.10471466 15.955 8.3C14.8179027 11.722518 11.6063915 14.0236636 8 14C7.120345 13.99891 6.2462182 13.8609255 5.409 13.591L5.409 13.591L7.07 11.93C7.37793008 11.9755169 7.68872595 11.9989101 8 12C10.6174125 12.0234193 12.9793656 10.4336815 13.943 8C13.6875037 7.32632108 13.3083247 6.70633969 12.825 6.172L12.825 6.172L14.235 4.762ZM12 7C12 9.209139 10.209139 11 8 11L8 11L12 7ZM4.557 5C3.41551402 5.69680208 2.53653736 6.75157407 2.057 8C2.44904358 9.02788316 3.11937993 9.92639702 3.993 10.595L3.993 10.595L4.979 9.609C3.85358083 8.32680204 3.68313734 6.46525219 4.557 5ZM8.5 5C7.67157288 5 7 5.67157288 7 6.5C7.00262722 6.79458442 7.09430935 7.08148324 7.263 7.323L7.263 7.323L9.323 5.263C9.08148324 5.09430935 8.79458442 5.00262722 8.5 5Z"
android:fillColor="?primaryText"
android:fillAlpha="0.8"
tools:ignore="VectorPath" />
</group>
</vector>

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"
xmlns:tools="http://schemas.android.com/tools"
android:viewportWidth="16"
android:viewportHeight="12"
android:width="16dp"
android:height="12dp">
<group
android:translateY="-2">
<path
android:pathData="M15.955 7.7C14.8179027 4.27748201 11.6063915 1.97633636 8 2C4.39360848 1.97633636 1.18209732 4.27748201 0.045 7.7C-0.0151633613 7.89342976 -0.0151633613 8.10057024 0.045 8.294C1.18000461 11.7188904 4.39201034 14.0228131 8 14C11.6063915 14.0236636 14.8179027 11.722518 15.955 8.3C16.0164144 8.10471466 16.0164144 7.89528534 15.955 7.7ZM8.5 5C9.32842712 5 10 5.67157288 10 6.5C10 7.32842712 9.32842712 8 8.5 8C7.67157288 8 7 7.32842712 7 6.5C7 5.67157288 7.67157288 5 8.5 5ZM8 12C5.38258749 12.0234193 3.02063441 10.4336815 2.057 8C2.53653736 6.75157407 3.41551402 5.69680208 4.557 5C4.19654605 5.60517096 4.00425395 6.29562734 4 7C4.00000003 9.20913898 5.79086102 11 8 11C10.209139 11 12 9.20913898 12 7C11.9963514 6.29581229 11.8047533 5.60536864 11.445 5C12.586486 5.69680208 13.4654626 6.75157407 13.945 8C12.9811024 10.4343681 10.6181403 12.0242501 8 12Z"
android:fillColor="?primaryText"
android:fillAlpha="0.8"
tools:ignore="VectorPath"/>
</group>
</vector>

@ -111,11 +111,12 @@
android:layout_height="48dp"
android:layout_marginEnd="16dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:tint="?android:colorAccent"
android:contentDescription="@string/saved_login_reveal_password"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/copyPasswordItem"
app:layout_constraintTop_toBottomOf="@id/copyUsernameItem"
app:srcCompat="@drawable/ic_password_reveal" />
app:srcCompat="@drawable/mozac_ic_password_reveal" />
<ImageButton
android:id="@+id/copyPasswordItem"

Loading…
Cancel
Save