ScrollView添加自定义view显示不完全?该怎么解决

ScrollView添加自定义view显示不完全????????????????
如下所述:
情况一:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<com.views.myView
android:layout_height="fill_parent"
android:layout_width="fill_parent" />
</LinearLayout>
显示:


情况二:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<com.views.myView
android:layout_height="fill_parent"
android:layout_width="fill_parent" />
</ScrollView>
</LinearLayout>
显示:


怎么设置myView才能全部显示呢..

------解决方案--------------------
ScrollView加属性android:fillViewport="true"
------解决方案--------------------
自定义的View一定要重载实现public void onMeasure(int widthMeasureSpec, int heightMeasureSpec)函数,在其中调用setMeasuredDimension函数,设置自定义的View的宽和高。