我在ExpandableListview
内ScrollView
,我知道这不好,但我也有,显示整个列表的唯一解决方案是使用layoutParams
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, ExpandableListViewData.length());
我提出了一个解决方案,每当我扩展一组列表时,我会改变高度以适应新的高度
这个解决方案很好但是我无法在第一时间给出Params的高度固定值,所以有一种方法可以从数组的大小知道实际大小