android 中ListView嵌套ListView出现的问题
PHPz
PHPz 2017-04-17 17:42:22
0
1
508

PHPz
PHPz

学习是最好的投资!

reply all(1)
洪涛

First of all, I don’t understand why the listView is nested in this interface. I think a listView is enough
When the listView is nested, you usually write a custom class to inherit the ListView, and then override the onMeasure method
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {

int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);

}
Then just change the nested listView to this control. However, although this is simple and crude, it is not very efficient. Try not to nest when possible

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template