<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