Skip to content

Commit 382ce9c

Browse files
pubiqqafohrman
authored andcommitted
[TopAppBar] Fix copy constructors
Resolves #2686 GIT_ORIGIN_REV_ID=7f62b56c7edf01046e85b474d1cf0f17c6153b68 PiperOrigin-RevId: 450440535
1 parent a3ca744 commit 382ce9c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/java/com/google/android/material/appbar/AppBarLayout.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,7 @@ public LayoutParams(@NonNull LayoutParams source) {
12431243
// The copy constructor called here only exists on API 19+.
12441244
super(source);
12451245
scrollFlags = source.scrollFlags;
1246+
scrollEffect = source.scrollEffect;
12461247
scrollInterpolator = source.scrollInterpolator;
12471248
}
12481249

lib/java/com/google/android/material/appbar/CollapsingToolbarLayout.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,6 +1617,14 @@ public LayoutParams(@NonNull FrameLayout.LayoutParams source) {
16171617
super(source);
16181618
}
16191619

1620+
@RequiresApi(19)
1621+
public LayoutParams(@NonNull LayoutParams source) {
1622+
// The copy constructor called here only exists on API 19+.
1623+
super(source);
1624+
collapseMode = source.collapseMode;
1625+
parallaxMult = source.parallaxMult;
1626+
}
1627+
16201628
/**
16211629
* Set the collapse mode.
16221630
*

0 commit comments

Comments
 (0)