well I just got hammered for supposedly being hard to understand but this is not going to be fun
first off ( short of going an looking ) SurfaceView should be on the constructor chain of View as the normal convention of Java suggest so by the class name thus I would if coding a short sample here subclass SurfaceView for you class as all the Veiw stuff would probably be available then, for what you are asking first go look at the blog post of post is by Dianne Hackborn, a Software Engineer who sits very near the exact center of everything Android "Android Developers Blog: Multitasking the Android Way" what happens is that the thread that is launching the application gets used to "draw the screen" which it has to or there will be an A.N.R. if it gets into a lot of calc's or hangs somewhere waiting on something to do the "moving things around" on the screen you all but have to have another thread doing the "moving things around" so how do you do that?... you have another thread doing the calcs what you have to figure out is how the two threads "talk" simple really but I'm not going to get hammered again so you'll have to figure it out yourself On Nov 23, 7:49 am, John Goche <[email protected]> wrote: > Hello, > > Let me rephrase my question. Given the information found > athttp://developer.android.com/guide/topics/graphics/2d-graphics.html > which states: > > "The aim of SurfaceView is to offer this drawing surface > to an application's secondary thread, so that the application isn't > required to wait until the system's View hierarchy is ready to draw." > > if I have just a single View on my screen (say for a game) why would the > View hierarchy take a longer time to draw than if the View's Canvas is > updated from a separate thread? > > Thanks for your feedback, > > John Goche > > On Wed, Nov 23, 2011 at 1:30 PM, John Goche <[email protected]>wrote: > > > > > > > > > > > Hello, > > > Could anyone kindly explain to me what the difference is between > > using a SurfaceView and subclassing a View class and overriding > > its onDraw() mehtod? Plus I've read a thread on this mailing list > > that SurfaceView has problems on newer phones (and perhaps > > GLSurfaceView is affected as well). Can someone please give > > me an update on this? > > > Thanks, > > > John Goche -- 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

