-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Extending SurfaceView
SurfaceView provides a dedicated drawing surface embedded inside of a view hierarchy. You can control the format of this surface and, if you like, its size; the SurfaceView takes care of placing the surface at the correct location on the screen.
One of the purposes of this class is to provide a surface in which a secondary thread can render into the screen. If you need to perform complex drawing operations many times a second, you may want to offload the drawing off the UIThread and that is the purpose of this view.
A SurfaceView Demo for rocket burst and page curl by Infinut
Droidcon NYC 2015 talk that explains the above demo step-by-step
- http://infinut.com/2013/10/10/to-opengl-or-to-surfaceview/
- http://developer.android.com/reference/android/view/SurfaceView.html
- http://javandroidevelop.blogspot.com/2012/09/all-about-surfaceview-android-lessons.html
- http://blog.wisecells.com/surface-view-android//
- http://blog.lemberg.co.uk/surface-view-playing-video
- https://github.com/google/grafika/blob/master/src/com/android/grafika/PlayMovieSurfaceActivity.java
- https://gist.github.com/ErikHellman/5840101
- http://stackoverflow.com/questions/12273976/camera-tutorial-for-android-using-surfaceview
Created by CodePath with much help from the community. Contributed content licensed under cc-wiki with attribution required. You are free to remix and reuse, as long as you attribute and use a similar license.
Finding these guides helpful?
We need help from the broader community to improve these guides, add new topics and keep the topics up-to-date. See our contribution guidelines here and our topic issues list for great ways to help out.
Check these same guides through our standalone viewer for a better browsing experience and an improved search. Follow us on twitter @codepath for access to more useful Android development resources.