Android: make a scrollable custom view

I've rolled my own custom view and can draw to the screen alright, but what I'd really like to do is set the measuredHeigh of the screen to, say, 1000px and let the user scroll on the Y axis, but I'm having problems doing this. Can anyone help?

I've tried to override scrollTo, scrollBy, awakenScrollBars etc with a call to super but to no avail. Am I missing something silly, or am I making some fundamental mistake?

Thank you in advance,

Martyn

Addition:

I've tried to add this as a custom component with the below layout file and changed the code in

TestScreen

to point at the correct resource with

setContentView(R.layout.exampleLayout)

, but this causes the emulator to crash. I tried commenting the code down to the bare minimum and it still crashes, so there's something fundamentally wrong that I'm doing but I'm not sure what it is :