1.设置minWidth和minHeight
2.执行measure(0,0)
tv.minWidth=abs(right-left)
tv.minHeight=abs(bottom-right)
addView(tv,generateDefaultLayoutParams())
tv.measure(0,0)
tv.layout(left, top, right, bottom).
1.设置minWidth和minHeight
2.执行measure(0,0)
tv.minWidth=abs(right-left)
tv.minHeight=abs(bottom-right)
addView(tv,generateDefaultLayoutParams())
tv.measure(0,0)
tv.layout(left, top, right, bottom).
本文标题:2019-07-30 自定义ViewGroup添加TextVie
本文链接:https://www.haomeiwen.com/subject/hsjorctx.html
网友评论