tags:

views:

428

answers:

1

Hi,

I want to draw an image that on some levels may be larger than the screen as the background for a Android game. I want the user to be able to scroll the image using their finger on the touch screen.

Here is how I am drawing the background:

Bitmap scratch =  BitmapFactory.decodeResource(getResources(),R.drawable.background);
canvas.drawColor(Color.BLACK);
canvas.drawBitmap(scratch, 0, 0, null);
A: 

You could use a ImageView and put it in a ScrollView - I suspect this is not what you want though. If not, you're going to have to roll your own - take a look at the GestureDetector for help with fling gestures.

Isaac Waller