2
我需要检查View
子类是否有其android:layout_height
财产wrap_content
或固定值从ListView
的Adapter
,我怎么能做到这一点编程?检查属性WRAP_CONTENT或固定高度(通过编程)
PS:这是为了做这样的事情:
// Pseudo code
If attribute = wrap_content Then
calculateViewHeight();
Else
// If it was fixed, do nothing
End if
而且没了,我不能Override
onMeasure()
lp.height ==修复了ViewGroup.LayoutParams.WRAP_CONTENT – worked 2016-03-09 21:28:38
。谢谢指出。 – suitianshi 2016-03-10 01:47:11