// 动态加载GridView 高度 public static void setListViewHeightBasedOnChildren(MyGridView myGridView) { ListAdapter listAdapter = myGridView.getAdapter(); if (listAdapter == null) { return; } int col = 5; int totalHeight = 0; for (int i = 0; i < listAdapter.…