|
|
|
|
13
|
|
13
|
|
14
|
@Override
|
14
|
@Override
|
15
|
public int getMeasuredHeight(int heightMeasureSpec) {
|
15
|
public int getMeasuredHeight(int heightMeasureSpec) {
|
16
|
- return hasChildren() ? header.getChildAt(0).getMeasuredHeight() : super.getMeasuredHeight(heightMeasureSpec);
|
|
|
|
|
16
|
+ return hasChildren() ? getFirstChildHeightAndTopMargin() : super.getMeasuredHeight(heightMeasureSpec);
|
|
|
17
|
+ }
|
|
|
18
|
+
|
|
|
19
|
+ private int getFirstChildHeightAndTopMargin() {
|
|
|
20
|
+ return header.getChildAt(0).getHeight() + header.getChildAt(0).getTop();
|
17
|
}
|
21
|
}
|
18
|
|
22
|
|
19
|
private boolean hasChildren() {
|
23
|
private boolean hasChildren() {
|