listview 的header包含一个gridview ,gridview想显示大图宽度是 match_parent,高度如果是固定高度图片能显示完全,如果是wrap_content为什么图片不能完全加载出来,已经自定义gridview
public class GridViewForListView extends GridView {
public GridViewForListView(Context context) {
super(context);
}
public GridViewForListView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
}
}