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

Fix toolbar height in account settings #7860

Merged
merged 2 commits into from
May 27, 2024
Merged

Conversation

cketti
Copy link
Member

@cketti cketti commented May 21, 2024

  • Use wrap_content for the toolbar height, so increasing the system font size doesn't break the layout.
  • Also switches from androidx.appcompat.widget.Toolbar to MaterialToolbar.
Before After
image image

Related to #7854

This allows the toolbar to grow when using a large system font size.
@cketti cketti requested a review from wmontwe as a code owner May 21, 2024 13:22
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="toolbarTitleMarginVertical">8dp</dimen>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Material 3 spec doesn't seem to explicitly specify this for the small top app bar. However, the app bar height is given as 64dp and the icon size as 48dp x 48dp. That leaves 16dp. Using an equal size for top and bottom padding we arrive at 8dp.

Copy link
Collaborator

@wmontwe wmontwe May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is vertically centered and title and subtitle are not officially supported in the Material 3 spec. We need to check with design if we still want to support this. Could be part of the settings rewrite.

Copy link
Collaborator

@wmontwe wmontwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@cketti cketti merged commit 4436fff into main May 27, 2024
2 checks passed
@cketti cketti deleted the account_settings_toolbar branch May 27, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants