So basically, if you are adding a view to another, you MUST set the LayoutParams of the view to the LayoutParams type that the parent uses, or you will get a runtime error.
就是說你要設置此layoutparameters須對父對象佈局設定,最上層的layout不需設定此項 |
这英文,大家都看着不爽,其实意思我也不是很明白,估计是在子View设置了LayoutParams,可能会使父类装不下之类的,要求你把父类的LayoutParams也改掉.
不懂不要紧,我还是把解决方法记下来:问题所在是在getView里面的某个View添加了LayoutParams...结果就是我删掉了,他就不报错了.希望大家也能得到启发哈