Jun 2 |
7:25 PM |
Mark M. |
has entered the room |
Mark M. |
turned on guest access |
Jun 2 |
7:30 PM |
Susheel |
has entered the room |
Susheel |
Hi Mark! How are you?
|
Mark M. |
hello, Susheel!
|
Mark M. |
how can I help you today?
|
Mark M. |
I'm fine -- and you?
|
Jun 2 |
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
|
Mark M. |
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
|
Mark M. |
in fact, if anything, what little I know about GPU compositing would suggest that it would be less performant
|
Mark M. |
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
|
Mark M. |
the chapter on jank in the book describes some tools for trying to identify where the problem lies
|
Jun 2 |
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
|
Mark M. |
"Finding and Eliminating Jank"
|
Mark M. |
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
|
Mark M. |
however, it is somewhat dated
|
Mark M. |
I am waiting for Android Studio's NDK support to stabilize before I try updating it
|
Mark M. |
heaven only knows when that will be
|
Susheel |
haha...thank you for your help Mark...
|
Susheel |
Take care
|
Mark M. |
you too!
|
Susheel |
has left the room |
Jun 2 |
8:25 PM |
Mark M. |
turned off guest access |