scrollview 和listview嵌套

 1 public class MyGridView extends GridView {   
 2     public MyGridView(Context context, AttributeSet attrs) {   
 3         super(context, attrs);   
 4     }   
 5   
 6     public MyGridView(Context context) {   
 7         super(context);   
 8     }   
 9   
10     public MyGridView(Context context, AttributeSet attrs, int defStyle) {   
11         super(context, attrs, defStyle);   
12     }   
13   
14     @Override   
15     public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {   
16   
17         int expandSpec = MeasureSpec.makeMeasureSpec(   
18                 Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);   
19         super.onMeasure(widthMeasureSpec, expandSpec);   
20     }   
21 }   

 

posted @ 2013-12-17 14:07  莲花味精  阅读(132)  评论(0编辑  收藏  举报