SurfaceViews handling, Thread, and general game design

by Dianne Hackborn » Wed, 15 Jul 2009 00:06:43 GMT


Sponsored Links
  very strongly recommend that you don't use multiple surface views.  A
surface view is a very heavy-weight object, and intended for the primary
area of the window -- for example, the video part of a video player, the
playfield of a game, etc. It is basically an overlay, and actually its own
separate full window that is simply being Z-ordered with your main window to
make it look like they are related.

I don't know what your "complicated" animation sequence is, but just having
some animation is not enough reason to use a surface view. Worst case, you
can just create an off-screen bitmap that you draw the animation in and
update the screen by drawing that bitmap to the screen with the normal
invalidate() mechanism. If you need the performance of a surface view, then
you should design your game so that your entire playfield is on surface
view, and you take care of drawing each of your boxes inside of that and
manage them however you want (not as their own views).

On Tue, Jul 14, 2009 at 4:27 AM, ayanir <ayanir...@gmail.com> wrote:



--
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.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Consequences Of Unlocking A Motorola Cliq

I'll try to be brief yet concise. I'm somewhat of a beginner to this
but..

I've done a little research and am interested in testing T-Mobile's T-
Zones ($5.99) with their Edge and 3G Network ($29.99) but I don't
actually own the phone or want to buy it to find out.

I do however have my girlfriends phone. I want to unlock it so that I
can bypass T-Mobile's lock, use my Suncom (old carrier) simcard in it
and be able to test this hypothesis of mine.

So my question is, what are the unintended consequences of unlocking a
Motorola Cliq? Will she lose 3G or any networking/syncing/backup
features? I've read Iphone had a problem with that.

Any advice/comments on any of the above subjects would be appreciated
but mostly I'm interested in not ruining my girlfriend's phone.


-m

-- 

2. Tree structure

Hi all
 My idea is to create a tree structure same as in windows device
manager. I would like to know how to create the tree structure in
android.
please help me i tried and finally i decided to post here.

-- 

3. Interaction between TimerTask and android Animations

4. Question on TouchRotateActivity sample

5. why Java, not Python?

6. How to build test project from command line?

7. MapView & onTouch events