-
Notifications
You must be signed in to change notification settings - Fork 206
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
Tweak layout spacing for the timetable screen tabs #911
Tweak layout spacing for the timetable screen tabs #911
Conversation
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'm not sure how it calculated a lot. But looks great!
private val maxTabRowHeight = 84.dp | ||
private val minTabRowHeight = 56.dp | ||
private val tabIndicatorHorizontalSpacing = 8.dp | ||
private val tabRowHorizontalSpacing = (maxTabRowHeight - baselineTabHeight) / 2 - tabIndicatorHorizontalSpacing |
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.
May I ask why we used maxTabRowHeight - baselineTabHeight
here? Is it a size for the corner round?
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.
Let me explain 🙋♂️
Tabs are already vertically center aligned to the parent container element (TabRow
), so I thought the horizontal spacing size should be the same as the vertical ones.
However, I noticed my mistake after this PR getting merged. (Sorry!) I checked the UI design spec (Figma) and it says a bit different layout constraints specified to Tabs and TabRow. They are not vertically aligned and the bottom padding amount is less than other directions.
I'm going to create a PR to match the implementation with the UI design spec later.
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.
Now I see the reason we use height!
Overview (Required)
Tweak spacing around tabs on the timetable screen.
Links
Screenshot