<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical">
<ScrollView android:id="@+id/scroll"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:fillViewport="true">
<adam.music.testfont.NwcDrawingArea android:id="@+id/NwcDrawingArea"
android:layout_height="2000dp"
android:layout_width="2000dp"
/>
</ScrollView>
</LinearLayout>
我创建了Android项目并编辑了如上的main.xml。 然后我自定义视图来绘制图像。 要查看滚动自定义视图的效果,请按照上述设置宽度和高度。 现在我可以在自定义视图中看到图像,但不会滚动。 你能帮我解决问题吗? 我应该添加更多东西吗?我无法滚动我的自定义视图
@Adam你试过这个吗? – cdhabecker