自定义View添加滚动条注意事项

布局文件部署好后,注意在自定义的MyView中重写一个方法

1 public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
2     setMeasuredDimension(800, 2000);
3 }

 

posted @ 2015-03-27 19:34  陶修瑕  阅读(423)  评论(0编辑  收藏  举报