TextView的android:maxHeight,android:minHeight的正确设置

设置最大(最小)高度(宽度)时,

需要同时设置Android:adjustViewBounds="true",这样设置才会生效。

在代码中设置时,需要setAdjustViewBounds为true。一个layout的实例:

android:adjustViewBounds="true"  

android:maxHeight="150.0dip"  

android:maxWidth="150.0dip"  

android:minHeight="33.0dip"  

android:minWidth="48.0dip"  

posted @ 2017-07-05 13:57  x-bing  阅读(11633)  评论(0编辑  收藏  举报