Logcat里一直报这个警告
StaticLayout W maxLineHeight should not be -1. maxLines:1 lineCount:1
原因是TextView设置了
android:maxLines="1"
android:ellipsize="end"
解决办法,修改成
android:singleLine="true"
android:ellipsize="end"
文章讨论了在Android开发中,当TextView设置为单行且使用ellipsize时,Logcat出现StaticLayoutWmaxLineHeightshouldnotbe-1警告的问题,解决方案是将maxLines属性改为singleLine并保持ellipsize不变。
Logcat里一直报这个警告
StaticLayout W maxLineHeight should not be -1. maxLines:1 lineCount:1
原因是TextView设置了
android:maxLines="1"
android:ellipsize="end"
解决办法,修改成
android:singleLine="true"
android:ellipsize="end"
3862

被折叠的 条评论
为什么被折叠?