Class Overview


A client may implement this interface to receive information about changes to the surface. When used with a SurfaceView, the Surface being held is only available between calls to surfaceCreated(SurfaceHolder) andsurfaceDestroyed(SurfaceHolder). The Callback is set with SurfaceHolder.addCallback method.

Public Methods


public abstract void surfaceChanged (SurfaceHolder holder, int format, int width, int height)

Added in API level 1

This is called immediately after any structural changes (format or size) have been made to the surface. You should at this point update the imagery in the surface. This method is always called at least once, aftersurfaceCreated(SurfaceHolder).

Parameters
holder The SurfaceHolder whose surface has changed.
format The new PixelFormat of the surface.
width The new width of the surface.
height The new height of the surface.

public abstract void surfaceCreated (SurfaceHolder holder)

Added in API level 1

This is called immediately after the surface is first created. Implementations of this should start up whatever rendering code they desire. Note that only one thread can ever draw into a Surface, so you should not draw into the Surface here if your normal rendering will be in another thread.

Parameters
holder The SurfaceHolder whose surface is being created.

public abstract void surfaceDestroyed (SurfaceHolder holder)

Added in API level 1

This is called immediately before a surface is being destroyed. After returning from this call, you should no longer try to access this surface. If you have a rendering thread that directly accesses the surface, you must ensure that thread is no longer touching the Surface before returning from this function.

Parameters
holder The SurfaceHolder whose surface is being destroyed.

SurfaceHolder.Callback的更多相关文章

  1. Surface、SurfaceView、SurfaceHolder及SurfaceHolder.Callback之间的关系

    转载请包含网址:http://blog.csdn.net/pathuang68/article/details/7351317 一.Surface Surface就是“表面”的意思.在SDK的文档中, ...

  2. Android图形系统之Surface、SurfaceView、SurfaceHolder及SurfaceHolder.Callback之间的联系

    1.Surface Surface extends Objectimplements Parcelable java.lang.Object    ↳ android.view.Surface Cla ...

  3. Android图形系统之Surface、SurfaceView、SurfaceHolder及SurfaceHolder.Callback开发实例

    原文:Android图形系统之Surface.SurfaceView.SurfaceHolder及SurfaceHolder.Callback之间的联系 Surface是原始图像缓冲区(raw buf ...

  4. Android 展示控件之Surface、SurfaceView、SurfaceHolder及SurfaceHolder.Callback之间的关系

    一.Surface Surface在SDK的文档中的描述是这样的:Handle onto a raw buffer that is being managed by the screen compos ...

  5. Android中的Surface, SurfaceHolder, SurfaceHolder.Callback, SurfaceView

    传入一个surface,然后让openGL在surface上画图 window->view hierachy(DecorView是tree的root)->ViewRoot->Surf ...

  6. android大扫盲之SurfaceView,SurfaceHolder,SurfaceHolder.CallBack

    最近接触到了SurfaceView,SurfaceHolder,SurfaceHolder.CallBack,一直不求其解,现在来粗浅认识一下它们. 先看一下官方的定义: 1.SurfaceView ...

  7. Android关于SurfaceView,SurfaceHolder,SurfaceHolder.CallBack详解

    官方的定义: 1.SurfaceView SurfaceView是视图(View)的继承类,这个视图里内嵌了一个专门用于绘制的Surface.你可以控制这个Surface的格式和尺寸.Surfacev ...

  8. Surface与SurfaceView、SurfaceHolder

    什么是Surface? android API的解释是:Handle onto a raw buffer that is being managed by the screen compositor ...

  9. 自己定义控件(2.2):SurfaceView和SurfaceHolder

    本例需求及流程: Activity载入自己定义的SurfaceView-> SurfaceView 构造器中启动线程A.循环改变SurfaceView的x,y坐标,当x,y坐标到某点时设渐显标志 ...

随机推荐

  1. python:用json把字典序列化到文件中

    #写程序最好是dump一次和load一次,可以存好几个文件 import json info={'name':'Tom', 'age':'12', 'job':'work',} f=open('fil ...

  2. c语言中各个类型的sizeof长度

    #include <stdio.h> int main() {     printf("\nA Char is %lu bytes", sizeof( char )); ...

  3. 1029 C语言文法定义与C程序的推导过程

    1 阅读并理解提供给大家的C语言文法文件. 2 参考该文件写出一个自己好理解版的现实版的完整版的C语言文法. 3 给出一段C程序,写出用上述文法产生这段C程序的推导过程. program → exte ...

  4. SlickGrid example 3a: 可编辑单元

    可编辑单元支持一列展示多个属性域,可以为编辑单元提供验证,并且自定义验证事件.   代码: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 T ...

  5. Javascript中自动切换焦点

      <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title&g ...

  6. Sumdiv(快速幂+约数和)

    Sumdiv Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 16244 Accepted: 4044 Description C ...

  7. Watch The Movie

    Watch The Movie Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Tot ...

  8. 《Effective C++》读书摘要

    http://www.cnblogs.com/fanzhidongyzby/archive/2012/11/18/2775603.html 1.让自己习惯C++ 条款01:视C++为一个语言联邦 条款 ...

  9. #pragma 的使用

    #pragma 的使用 尽管 C 和 C++ 都已经有标准,但是几乎每个编译器 (广义,包含连接器等) 扩展一些 C/C++ 关键字. 合理地应用这些关键字,有时候能使我们的工作非常方便.下面随便说说 ...

  10. Http 请求

    public static string HttpGet(string url) { HttpWebRequest request = (HttpWebRequest)WebRequest.Creat ...