|
|
|
|
94
|
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) getLayoutParams();
|
94
|
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) getLayoutParams();
|
95
|
int topBarHeight = ViewUtils.getPreferredHeight(topBar);
|
95
|
int topBarHeight = ViewUtils.getPreferredHeight(topBar);
|
96
|
if (topBarHeight == 0) {
|
96
|
if (topBarHeight == 0) {
|
97
|
- UiUtils.runOnPreDrawOnce(topBar, () -> layoutParams.topMargin = topBar.getHeight());
|
|
|
|
|
97
|
+ UiUtils.runOnMeasured(topBar, () -> layoutParams.topMargin = topBar.getHeight());
|
98
|
} else {
|
98
|
} else {
|
99
|
layoutParams.topMargin = topBarHeight;
|
99
|
layoutParams.topMargin = topBarHeight;
|
100
|
}
|
100
|
}
|