Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion SurfaceView scrolling
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dianne Hackborn  
View profile  
 More options Jul 8 2009, 12:34 pm
From: Dianne Hackborn <hack...@android.com>
Date: Wed, 8 Jul 2009 09:34:29 -0700
Local: Wed, Jul 8 2009 12:34 pm
Subject: Re: [android-developers] SurfaceView scrolling

Hi, if you are talking about having a larger SurfaceView inside of a
ScrollView, it is really not intended to be used that way: you should
effectively think of SurfaceView as an overlay you embed inside your window,
giving you an area in which you can directly draw independently of the
normal view update system.

So once you start using a SurfaceView, you are moving yourself into a world
where you have a blank area of pixels, and you are on your own to draw them
how you want.  It can be faster, but it also takes more effort.  If this is
really what you want, you will need to make the SurfaceView the size of the
visible area on screen and implement the scrolling yourself inside of the
surface view as you render.  Alternatively, just create an off-screen bitmap
and have it drawn by a normal ImageView (which can be sized to the entire
size of the bitmap and placed in a scroll view).

On Wed, Jul 8, 2009 at 12:37 AM, Lee <labor...@gmail.com> wrote:

> I am writing an application that involves rendering into a SurfaceView
> that is larger than the phone display size. (For example 1024*768
> pixels).

> I am currently displaying the image in the SurfaceView both scaled and
> unscaled. When I am unscaled I would like to implement support for the
> user to be able to move around the image using touch.

> There is so much seemingly information in the docs about how to handle
> scrolling and gestures that I am kind of stuck. I'd like to just have
> the system handle this for me but I'm not sure whether that's
> possible.

> What suggestions do people have in terms of having a SurfaveView
> scroll around to display the visible part of the underlying bitmap.

> Regards
> Lee

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.