-
Notifications
You must be signed in to change notification settings - Fork 475
Fixes #7041: Adds an attribute to change login prompt editText cursor color #7056
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7056 +/- ##
============================================
- Coverage 77.17% 77.04% -0.14%
- Complexity 4882 4885 +3
============================================
Files 645 651 +6
Lines 24053 24096 +43
Branches 3535 3536 +1
============================================
+ Hits 18563 18564 +1
- Misses 4006 4049 +43
+ Partials 1484 1483 -1
Continue to review full report at Codecov.
|
@@ -86,7 +86,6 @@ | |||
|
|||
<com.google.android.material.textfield.TextInputEditText | |||
android:id="@+id/password_field" | |||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use MozacPromptLoginTextInputLayoutCursorAppearance
style here? I don't see how they linked :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see it gets its value from the parent that has the style MozTextInputLayout
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, from the parent.
<style name="MozacPromptLoginTextInputLayoutCursorAppearance" parent="ThemeOverlay.MaterialComponents.TextInputEditText.OutlinedBox"> | ||
<item name="colorControlActivated">?mozacPromptLoginEditTextCursorColor</item> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are we proving the value for ?mozacPromptLoginEditTextCursorColor
? As we don't have a default value what will happen for consumer that doesn't provide this value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a sample code where we are providing the value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use the attribute in Fenix in styles.xml like this:
<item name="mozacPromptLoginEditTextCursorColor">@color/prompt_login_edit_text_cursor_color_normal_theme</item>
The same for private mode.
Regarding the default value, I tested on Fenix and if I don't use at all
?mozacPromptLoginEditTextCursorColor
it works as before (the cursor color is the same as before - the color from the Fenix issue). But I don't know what will happen for other apps.
Any suggestions? I'm open to any change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, I just wanted to confirm that we don't have a crash when we don't provide a value. 👍
bors r+ |
Build succeeded: |
This patch uses `mozacPromptLoginEditTextCursorColor` attribute defined in AC. Check PR: mozilla-mobile/android-components#7056
This patch uses `mozacPromptLoginEditTextCursorColor` attribute defined in AC. Check PR: mozilla-mobile/android-components#7056
Pull Request checklist
After merge