This repository was archived by the owner on Dec 11, 2025. It is now read-only.
[AppBar] Always apply the default shadow behavior when theming.#9529
Closed
jverkoey wants to merge 3 commits intomaterial-components:developfrom
Closed
[AppBar] Always apply the default shadow behavior when theming.#9529jverkoey wants to merge 3 commits intomaterial-components:developfrom
jverkoey wants to merge 3 commits intomaterial-components:developfrom
Conversation
Both Primary and Surface theming are expected to have a shadow when scrolled. See https://material.io/components/app-bars-top/#theming for more details. Related to https://github.com/material-components/material-components-ios/issues/6332
|
bazel detected changes to the following targets: |
| CGFloat elevation = MDCShadowElevationAppBar * intensity; | ||
| weakSelf.headerView.elevation = elevation; | ||
| [(MDCShadowLayer *)shadowLayer setElevation:elevation]; | ||
| }; |
There was a problem hiding this comment.
clang-format suggested the following change:
- ^(CALayer *_Nonnull shadowLayer, CGFloat intensity) {
- CGFloat elevation = MDCShadowElevationAppBar * intensity;
- weakSelf.headerView.elevation = elevation;
- [(MDCShadowLayer *)shadowLayer setElevation:elevation];
- };
+ ^(CALayer *_Nonnull shadowLayer, CGFloat intensity) {
+ CGFloat elevation = MDCShadowElevationAppBar * intensity;
+ weakSelf.headerView.elevation = elevation;
+ [(MDCShadowLayer *)shadowLayer setElevation:elevation];
+ };
added 2 commits
January 30, 2020 10:21
copybara-service bot
pushed a commit
that referenced
this pull request
Jan 31, 2020
Both Primary and Surface theming are expected to have a shadow when scrolled. See https://material.io/components/app-bars-top/#theming for more details. This fixes a bug where the AppBar's Primary theming implementation would set a shadow layer that would not react to scrolling. Example before/after of a Surface-themed app bar (note the darker shadow in alignment with the expected behavior) | Before | After | |:--|:--| |  |  | Related to https://github.com/material-components/material-components-ios/issues/6332 Closes #9529 COPYBARA_INTEGRATE_REVIEW=#9529 from jverkoey:theming 62ba0b8 PiperOrigin-RevId: 292526419
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both Primary and Surface theming are expected to have a shadow when scrolled. See https://material.io/components/app-bars-top/#theming for more details.
This fixes a bug where the AppBar's Primary theming implementation would set a shadow layer that would not react to scrolling.
Example before/after of a Surface-themed app bar (note the darker shadow in alignment with the expected behavior)
Related to https://github.com/material-components/material-components-ios/issues/6332