Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created standard styles for TextInputLayout #458

Merged
merged 6 commits into from
Feb 7, 2019
Merged

Created standard styles for TextInputLayout #458

merged 6 commits into from
Feb 7, 2019

Conversation

eoji
Copy link
Contributor

@eoji eoji commented Feb 4, 2019

What ❓

  • Created a BaseTextInputLayout and then we basically have 2 types. One that lives in a form view (its parent has padding so it doesn't need start or end margin. And the ones that are used in Settings, they need activity_horizontal_margin on the start and end.
  • Per documentation: The hint should be set on the TextInputLayout, rather than the EditText
  • Created a BasePasswordTextInputLayout to handle showing the visibility icon and changing its color.
  • (Bonus fun times: making payment methods row visible)

Story 📖

Trello

See 👀

FormTextInputLayout

SettingsTextInputLayout

@eoji eoji added the UI 🎨 label Feb 4, 2019
@eoji eoji requested a review from dnywh February 4, 2019 16:44
@kussberg
Copy link

kussberg commented Feb 5, 2019

The layout here is still broken, the hint should be positioned vertically center when the input field is empty. In your case it is shifted to the bottom.

@eoji
Copy link
Contributor Author

eoji commented Feb 5, 2019

@ekussberg, yep! Here's the issue opened on the material components repo material-components/material-components-android#120. Hope they fix it soon!

@dnywh
Copy link
Contributor

dnywh commented Feb 6, 2019

Should all of them have the same top and bottom margin

@eoji yes please. The 'same' value should be similar to the Create Password example below. The Material guidelines are pretty vague as to why that much vertical space—I take it's for assistive text.

Even if we don't use assistive text, (i.e. maybe Login) we should use the same spacing for visual consistency.

I think that's what you were double-checking. Let me know if you meant something else.

Create Password example Material example
text field spec Material example

@eoji eoji merged commit f26e897 into master Feb 7, 2019
@eoji eoji deleted the io/til-styles branch February 7, 2019 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants