android动态设置ExpadableListview高度

时间:2013-10-01 14:43:43

标签: android height expandablelistview params

我在ExpandableListviewScrollView,我知道这不好,但我也有,显示整个列表的唯一解决方案是使用layoutParams

RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, ExpandableListViewData.length());

我提出了一个解决方案,每当我扩展一组列表时,我会改变高度以适应新的高度

这个解决方案很好但是我无法在第一时间给出Params的高度固定值,所以有一种方法可以从数组的大小知道实际大小

0 个答案:

没有答案