摘要:
1:首先设置ListView的高度,在setAdapter之后调用此方法。public static void setListViewHeightBasedOnChildren(ListView listView) { ListAdapter listAdapter = listView.getAdapter(); if (listAdapter == null) { return; } int totalHeight = 0; int len = listAdapter.getC... 阅读全文