RulerView icon indicating copy to clipboard operation
RulerView copied to clipboard

ScrollView嵌套的问题

Open wallyperry opened this issue 7 years ago • 2 comments

外层套ScrollView+LinearLayout后,发生了高度wrap_content无效,高度直接填充了整个屏幕,需要怎么解决啊

wallyperry avatar Apr 15 '19 09:04 wallyperry

刚刚看了下代码,有段代码位置放错了,需要替换一下 switch (heightModule) { case MeasureSpec.AT_MOST: case MeasureSpec.UNSPECIFIED: height = rulerHeight + (showScaleResult ? resultNumRect.height() : 0) + rulerToResultgap * 2 + getPaddingTop() + getPaddingBottom(); break; case MeasureSpec.EXACTLY: height = heightSize + getPaddingTop() + getPaddingBottom(); break; } onMeasure中caseUNSPECIFIED放在和AT_MOST一起就可以了

superSp avatar Apr 16 '19 06:04 superSp

1.5版本已经修复

superSp avatar Apr 16 '19 07:04 superSp