嵌套的GrdiView和ListView显示不全,直接重写onMessure()方法解决
public void onMeasure(int widthMeasureSpec,inheightMeasureSpec){
intmExpandSpec=MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE>>2, MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, mExpandSpec);
}
ScrollView 弹性滑动重写overScrollBy()方法
protected boolean overScrollBy(int deltaX, int deltaY, int scrollX,
int scrollY, int scrollRangeX, int scrollRangeY,
int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
return super.overScrollBy(deltaX, deltaY, scrollX, scrollY,
scrollRangeX, scrollRangeY, maxOverScrollX, 120, isTouchEvent);
}
网友评论