Office Hours — Today, June 2

Yesterday, June 1

Jun 2
7:25 PM
Mark M.
has entered the room
Mark M.
turned on guest access
7:30 PM
Susheel
has entered the room
Susheel
Hi Mark! How are you?
Mark M.
hello, Susheel!
how can I help you today?
I'm fine -- and you?
7:35 PM
Susheel
Good thank you! Please can you give me the use cases for surfaceview? when is it more suitable to use than using a regular view class?
Mark M.
um, AFAIK, it's only necessary when you are handing it over to some external process to populate (MediaPlayer, Camera, etc.) or for OpenGL
but, other than using it for media, I haven't used it much
Susheel
If I need to display a certain number of images on my android screen and if I want to move them and perform basic operations like scale, etc using touch, is that a good reason to use surfaceview because I've heard that it is more performant...
Mark M.
AFAIK, SurfaceView cannot be more performant for what you describe
in fact, if anything, what little I know about GPU compositing would suggest that it would be less performant
but, again, you're outside my area of expertise
Susheel
right now I am just re-drawing the views at their new position to do a translate operation for instance...I was wondering why there is a small lag...
Mark M.
that would depend a lot on how you are doing it, in particular how frequently
the chapter on jank in the book describes some tools for trying to identify where the problem lies
7:40 PM
Susheel
jank in the book....hmm
Mark M.
but this is the sort of thing that I tend to rely on other experts to create, where I stick to existing working components
"Finding and Eliminating Jank"
begins on page 3309 in Version 7.3 of the book
Susheel
just found it...thank you! I will read it...I love your book and the code examples that come with it...were you going to introduce any ndk related stuff in the book?
Mark M.
there is a chapter on the NDK
however, it is somewhat dated
I am waiting for Android Studio's NDK support to stabilize before I try updating it
heaven only knows when that will be
Susheel
haha...thank you for your help Mark...
Take care
Mark M.
you too!
Susheel
has left the room
8:25 PM
Mark M.
turned off guest access

Yesterday, June 1

 

Office Hours

People in this transcript

  • Mark Murphy
  • Susheel