我正在使用material calendarview来阻止3/4的屏幕高度。我自定义了屏幕的高度,但在日磁砖和Calendarview的高度之间仍然有一些填充。

下面我附上了截图,现在看起来如何:

java - 素材日历 View 高度包装问题-LMLPHP

最佳答案

最终,经过长时间的努力,我发现在onMeasure()方法上的libs。

measuredHeight = (int)(measuredHeight/1.5);
setMeasuredDimension(
            //We clamp inline because we want to use un-clamped versions on the children
            clampSize(measuredWidth, widthMeasureSpec),
            clampSize(measuredHeight, heightMeasureSpec));

07-24 09:39
查看更多