import android.content.Context; import android.util.AttributeSet; import android.widget.ListView; /** * * @author jiarh *2014-8-14 */ public class UserListView extends ListView { public UserListView(Context context) { super(context); } public UserListView(Context context, AttributeSet attrs) { super(context, attrs); } public UserListView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); super.onMeasure(widthMeasureSpec, expandSpec); } }
版权声明:本文博客原创文章。博客,未经同意,不得转载。