I have a ScrollView with a single custom view inside of it. It will not scroll. I can get it to scroll if I put in a textview in it. I've looked for a solution but I can't find why it won't scroll.
I assume I need to somehow notify the ScrollView when my Custom view draws. This code is from onDraw on the custom control.
canvas.drawLine(0, 0, 2000, 2000, paint); canvas.drawLine(0, 200, 2000, 200, paint); canvas.drawLine(0, 300, 2000, 300, paint); canvas.drawLine(0, 400, 2000, 400, paint); canvas.drawLine(0, 500, 2000, 500, paint); canvas.drawLine(0, 600, 2000, 600, paint); canvas.drawLine(0, 700, 2000, 700, paint); canvas.drawLine(0, 800, 2000, 800, paint); canvas.drawLine(0, 900, 2000, 900, paint); canvas.drawLine(0, 1000, 2000, 1000, paint); canvas.drawLine(0, 1100, 2000, 1000, paint); This is the xml file
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/button_scroll" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center_horizontal" android:fillViewport="true" > <SCEWidgetWarehouseView android:id="@+id/WarehouseView" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </HorizontalScrollView>