mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
am 8e0b8093: am 551a28ad: am 39cfe79f: am a0e42834: Merge "Allow AppBarLayout to handle size changes" into lmp-mr1-ub-dev
* commit '8e0b80934b91b5398cd0a652fcd6316a7b98b472': Allow AppBarLayout to handle size changes GitOrigin-RevId=d8bf9fa65716dd427e0ee2366802385185f23c4e PiperOrigin-RevId: 140548869
This commit is contained in:
parent
c3c5e74e7a
commit
f9009de091
@ -1024,7 +1024,12 @@ public class AppBarLayout extends LinearLayout {
|
||||
ViewCompat.setFitsSystemWindows(child, true);
|
||||
}
|
||||
|
||||
final int height = parent.getHeight() - appBar.getMeasuredHeight()
|
||||
int availableHeight = MeasureSpec.getSize(parentHeightMeasureSpec);
|
||||
if (availableHeight == 0) {
|
||||
// If the measure spec doesn't specify a size, use the current height
|
||||
availableHeight = parent.getHeight();
|
||||
}
|
||||
final int height = availableHeight - appBar.getMeasuredHeight()
|
||||
+ appBar.getTotalScrollRange();
|
||||
final int heightMeasureSpec = MeasureSpec.makeMeasureSpec(height,
|
||||
MeasureSpec.AT_MOST);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user