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

[Tabs] Correct MDCTabBarView behavior for contentInset. #8512

Merged
merged 2 commits into from
Sep 27, 2019
Merged

[Tabs] Correct MDCTabBarView behavior for contentInset. #8512

merged 2 commits into from
Sep 27, 2019

Conversation

romoore
Copy link
Contributor

@romoore romoore commented Sep 26, 2019

When contentInset is non-zero, MDCTabBarView was misplacing the tabs views.
This PR corrects the issue by making the following changes:

  • Clustered Fixed tabs now set the contentSize to fill the entire safe area
    bounds.
  • Justified tabs tabs now expand the contentSize to fill at least the entire safe
    area bounds.
  • Right-aligned tabs position tabs views only within the content area and no
    longer depend on the min-X position of the bounds.
  • Rendering the divider line at the end of layoutSubviews to handle cases
    where scrolling adjusted the X-offset of the bounds.

Fixes #8236

When `contentInset` is non-zero, MDCTabBarView was misplacing the tabs views.
This PR corrects the issue by making the following changes:

*  Clustered Fixed tabs now set the `contentSize` to fill the entire safe area
   bounds.
*  Justified tabs tabs now expand the `contentSize` to fill the entire safe
   area bounds.
*  Right-aligned tabs position tabs views only within the content area and no
   longer depend on the min-X position of the bounds.
*  Rendering the divider line at the end of `layoutSubviews` to handle cases
   where scrolling adjusted the X-offset of the bounds.

Fixes #8236
@material-automation
Copy link

material-automation commented Sep 26, 2019

bazel detected changes to the following targets:

//components/Tabs:snapshot_tests
//components/Tabs:snapshot_tests_test_bundle
//components/Tabs:unit_tests
//components/Tabs:unit_tests_IPAD_PRO_12_9_IN_9_3
//components/Tabs:unit_tests_IPAD_PRO_12_9_IN_9_3_test_bundle
//components/Tabs:unit_tests_IPHONE_7_PLUS_IN_10_3
//components/Tabs:unit_tests_IPHONE_7_PLUS_IN_10_3_test_bundle
//components/Tabs:unit_tests_environment
//components/Tabs:unit_tests_environment_test_bundle

@romoore romoore merged commit 86b5971 into material-components:develop Sep 27, 2019
@romoore romoore deleted the issue-8236 branch September 27, 2019 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants