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. YTU 2972: C语言习题5.24--文件操作1

    2972: C语言习题5.24--文件操作1 时间限制: 1 Sec  内存限制: 128 MB 提交: 248  解决: 94 题目描述 文本文件score.dic 中存储了n名学生的信息(班级编号 ...

  2. c#线程创建

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  3. CSUFT 1002 Robot Navigation

    1002: Robot Navigation Time Limit: 1 Sec      Memory Limit: 128 MB Submit: 4      Solved: 2 Descript ...

  4. python 使用 redis expire属性设置访问时间间隔

    安装redis yum install redis 安装python redis扩展 pip install redis 启动redis,并设定开机自动启动 service redis start c ...

  5. 解决浏览器使用<pre></pre>时不换行

    <!-- 解决火狐浏览器中pre标签不换行 --> <style type="text/css"> pre { white-space: pre-wrap; ...

  6. git总结

    1.先画个图,先对git的操作有个直观了解 2.分析下git中文件是怎么存储的 正如下面所示git存储不是每次更改就会产生一个新的文件,而是产生一个版本,这个版本对应着记录每个文件的不同情况 具体的存 ...

  7. reactjs入门到实战(十)----one-first_app

    index <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <!-- ...

  8. AutoIt实现selenium上传文件

    1,安装autoIt 2,工程中建文件夹,例如:script,将autoit 复制到该文件夹,并且编辑视频所在的文件夹的路径,编辑"au3"格式的文件 3,编辑完成后生成EXE文件 ...

  9. (5)Redis几个认识误区

    前几天微博发生了一起大的系统故障,很多技术的朋友都比较关心,其中的原因不会超出James Hamilton在On Designing and Deploying Internet-Scale Serv ...

  10. 【leetcode❤python】191. Number of 1 Bits

    #-*- coding: UTF-8 -*- class Solution(object):    def hammingWeight(self, n):        if n<=0:retu ...