The main reason to use a SurfaceView is that you control the rendering thread and you can eliminate a lot of overhead. Views must use the invalidation mechanism to trigger redraws. A call to invalidate() walks up the View tree and marks Views dirty on top of keeping track of some extra state. When it reaches the top of the tree, it schedules a draw pass, which will in turn traverse the View tree down to call View.draw() on dirty Views (and also manage some extra state.) All this is usually unnecessary when you write a game.
With SurfaceView you can draw directly. On Wed, Nov 21, 2012 at 8:26 AM, bob <[email protected]> wrote: > Can someone tell me in layman's terms why you would use a SurfaceView > instead of a View when making a game? > > > Is it because a dual-core can distribute the load better? > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer [email protected] -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

