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. Pre-Installed app and contents provider.

Hi

Now, I am building android from source code.
And I add pre-installed app (/system/app).

The app has big data at contents provider,
 so I want to make contents provider's data beforehand, and load the
data from the app.

I think, the first run of Android  is
1.android install pre-install apps and create contents provider.
2.user run app and insert data to app's contents provider.

I want to prepared the date of contents provider such as /data/data/
com.aaa.app/.

I want to change the process of installing such as,
1.android install pre-install apps and use /data/data/com.aaa.app/
( prepared, beforehand )
2.user run app and load data to app's contents provider.

How do the app load the data ?

Thanks in Advance.

Akira

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. How to dump a Sqlite statements txt file into db.

Hi,
I am preparing a new update of my appliction, in this version I need
to insert lot of new rows (200) in my db.

Because I don't want to programatically add 200 insert code line for
each row, I would like to know what is the best method to accomplish
it just with a call to the file and dumping it into my db.

Regards.

-- 

3. Re[2]: [WTPaging] Pengguna HTC HD2 TMobile / Int pake Kombinasi ROM apa ???

4. Rupiah dalam market?

5. Pengguna HTC HD2 TMobile / Int pake Kombinasi ROM apa ??

6. VOOT [BANTU JOGJA] Cerita Pengungsi Merapi

7. Aneka Aksesories Samsung Galaxy Tab & Dell Strea