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
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) {
}
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