android.view.SurfaceView源码实例Demo

类android.view.SurfaceView源码实例Demo

下面列出了android.view.SurfaceView 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: sealtalk-android   文件: MultiVideoCallActivity.java
void addRemoteVideo(View singleRemoteView, SurfaceView video, String userId) {
        if (singleRemoteView == null)
            return;
        FrameLayout remoteVideoView = (FrameLayout) singleRemoteView.findViewById(R.id.viewlet_remote_video_user);
        remoteVideoView.removeAllViews();
        if (video.getParent() != null) {
            ((ViewGroup) video.getParent()).removeView(video);
        }
        remoteVideoView.addView(video, new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT));
//        TextView remoteNameTextView = new TextView(this);
//        TextView tv = (TextView) singleRemoteView.findViewById(R.id.user_name);
//        ViewGroup.LayoutParams params = tv.getLayoutParams();
//        remoteNameTextView.setLayoutParams(params);
//        remoteNameTextView.setTextAppearance(this, R.style.rc_voip_text_style_style);
//        UserInfo userInfo = RongContext.getInstance().getUserInfoFromCache(userId);
//        if (userInfo != null) {
//            remoteNameTextView.setText(userInfo.getName());
//        } else {
//            remoteNameTextView.setText(userId);
//        }
//        remoteVideoView.addView(remoteNameTextView);
        remoteVideoView.setVisibility(View.VISIBLE);
        remoteVideoView.setTag(userId);
    }
 
@Override
protected void onPause() {
    super.onPause();
    Log.v(TAG, "onPause()");

    if (handler != null) {
        handler.quitSynchronously();
        handler = null;
    }

    cameraManager.closeDriver();

    if (!hasSurface) {
        SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
        SurfaceHolder surfaceHolder = surfaceView.getHolder();
        surfaceHolder.removeCallback(this);
    }
}
 
源代码3 项目: goprohero   文件: LiveStuffH4.java
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Set up a full-screen black window.
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    Window window = getWindow();
    window.setFlags(
            WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
    window.setBackgroundDrawableResource(android.R.color.black);

    setContentView(R.layout.activity_live_stuff);

    // Configure the view that renders live video.
    SurfaceView surfaceView =
            (SurfaceView) findViewById(R.id.surfaceView);
    _surfaceHolder = surfaceView.getHolder();
    _surfaceHolder.addCallback(this);
    _surfaceHolder.setFixedSize(320, 240);
}
 
源代码4 项目: QrScan   文件: CaptureActivity.java
/**
 * 初始化照相机和surfaceView,使zxing不断尝试从摄像头获取照片并解码
 * 本方法在Activity的onResume中,以及在扫描功能被关闭后需要再次开启时调用
 */
private void initZXingCamera() {
    SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
    SurfaceHolder surfaceHolder = surfaceView.getHolder();
    if (hasSurface) {
        initCamera(surfaceHolder);
    } else {
        surfaceHolder.addCallback(this);
        surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
    }
    decodeFormats = null;
    characterSet = null;

    playBeep = true;
    AudioManager audioService = (AudioManager) getSystemService(AUDIO_SERVICE);
    if (audioService.getRingerMode() != AudioManager.RINGER_MODE_NORMAL) {
        playBeep = false;
    }

    vibrate = true;
}
 
源代码5 项目: grafika   文件: PlayMovieSurfaceActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(getContentViewId());

    mSurfaceView = (SurfaceView) findViewById(R.id.playMovie_surface);
    mSurfaceView.getHolder().addCallback(this);

    // Populate file-selection spinner.
    Spinner spinner = (Spinner) findViewById(R.id.playMovieFile_spinner);
    // Need to create one of these fancy ArrayAdapter thingies, and specify the generic layout
    // for the widget itself.
    mMovieFiles = MiscUtils.getFiles(getFilesDir(), "*.mp4");
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
            android.R.layout.simple_spinner_item, mMovieFiles);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    // Apply the adapter to the spinner.
    spinner.setAdapter(adapter);
    spinner.setOnItemSelectedListener(this);

    updateControls();
}
 
源代码6 项目: open-quartz   文件: MainActivity.java
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

    setContentView(R.layout.surface_view);

    /** View for OpenCV **/
    mOpenCvCameraView = (OGView) findViewById(R.id.tutorial3_activity_java_surface_view);
    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);
    mOpenCvCameraView.setCvCameraViewListener(this);

    /** Gesture for Glass **/
    mGestureDetector = new GestureDetector(this, this);
}
 
源代码7 项目: opencv-android-sample   文件: MainActivity.java
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    Log.i(TAG, "called onCreate");
    super.onCreate(savedInstanceState);

    // Load ndk built module, as specified
    // in moduleName in build.gradle
    System.loadLibrary("native");

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

    setContentView(R.layout.activity_main);

    mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.camera_view);

    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);

    mOpenCvCameraView.setCvCameraViewListener(this);
}
 
@Override
public void surfaceCreated(SurfaceHolder holder) {
    Log.d(TAG, "surfaceCreated holder=" + holder);

    File outputFile = new File(getFilesDir(), "fbo-gl-recording.mp4");
    SurfaceView sv = (SurfaceView) findViewById(R.id.fboActivity_surfaceView);
    mRenderThread = new RenderThread(sv.getHolder(), new ActivityHandler(this), outputFile,
            MiscUtils.getDisplayRefreshNsec(this));
    mRenderThread.setName("RecordFBO GL render");
    mRenderThread.start();
    mRenderThread.waitUntilReady();
    mRenderThread.setRecordMethod(mSelectedRecordMethod);

    RenderHandler rh = mRenderThread.getHandler();
    if (rh != null) {
        rh.sendSurfaceCreated();
    }

    // start the draw events
    Choreographer.getInstance().postFrameCallback(this);
}
 
源代码9 项目: media-samples   文件: ScreenCaptureFragment.java
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    mSurfaceView = (SurfaceView) view.findViewById(R.id.surface);
    mSurface = mSurfaceView.getHolder().getSurface();
    mButtonToggle = (Button) view.findViewById(R.id.toggle);
    mButtonToggle.setOnClickListener(this);
}
 
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    requestWindowFeature(Window.FEATURE_NO_TITLE);

    mSurfaceView = new SurfaceView(this);
    mSurfaceView.setOnClickListener(this);
    setContentView(mSurfaceView);
}
 
源代码11 项目: media-samples   文件: LocalPlayer.java
public SurfaceViewPlayer(Context context) {
    super(context);

    mLayout = (FrameLayout)((Activity)context).findViewById(R.id.player);
    mSurfaceView = (SurfaceView)((Activity)context).findViewById(R.id.surface_view);

    // add surface holder callback
    SurfaceHolder holder = mSurfaceView.getHolder();
    holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
    holder.addCallback(this);
}
 
源代码12 项目: NIM_Android_UIKit   文件: WatchVideoActivity.java
private void findViews() {
    downloadLayout = findViewById(R.id.layoutDownload);
    downloadProgressBackground = findViewById(R.id.downloadProgressBackground);
    downloadProgressForeground = findViewById(R.id.downloadProgressForeground);
    downloadProgressText = (TextView) findViewById(R.id.downloadProgressText);
    videoIcon = findViewById(R.id.videoIcon);

    surfaceView = (SurfaceView) findViewById(R.id.videoView);
    surfaceHolder = surfaceView.getHolder();
    surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
    surfaceHolder.addCallback(this);

    playTimeTextView = (TextView) findViewById(R.id.lblVideoTimes);
    playTimeTextView.setVisibility(View.INVISIBLE);
    fileInfoTextView = (TextView) findViewById(R.id.lblVideoFileInfo);
    playTimeTextView.setVisibility(View.INVISIBLE);

    downloadBtn = (ImageView) findViewById(R.id.control_download_btn);
    downloadBtn.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            if (downloading) {
                stopDownload();
            } else {
                download();
            }
            downloadBtn.setImageResource(downloading ? R.drawable.nim_icon_download_pause : R.drawable.nim_icon_download_resume);
        }
    });

    actionBar = getSupportActionBar();
}
 
源代码13 项目: ETSMobile-Android2   文件: MapActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_map);
    surfaceView = (SurfaceView) findViewById(R.id.activity_map_surfaceView);
    resetBtn = (ImageButton) findViewById(R.id.activity_map_reset);
    zoomBtn = (ImageButton) findViewById(R.id.activity_map_zoom);

}
 
public CameraSourcePreview(Context context, AttributeSet attrs) {
    super(context, attrs);
    mContext = context;
    mStartRequested = false;
    mSurfaceAvailable = false;

    mSurfaceView = new SurfaceView(context);
    mSurfaceView.getHolder().addCallback(new SurfaceCallback());
    addView(mSurfaceView);
}
 
源代码15 项目: android-chromium   文件: UiUtils.java
private static void prepareViewHierarchyForScreenshot(View view, boolean takingScreenshot) {
    if (view instanceof ViewGroup) {
        ViewGroup viewGroup = (ViewGroup) view;
        for (int i = 0; i < viewGroup.getChildCount(); i++) {
            prepareViewHierarchyForScreenshot(viewGroup.getChildAt(i), takingScreenshot);
        }
    } else if (view instanceof SurfaceView) {
        view.setWillNotDraw(!takingScreenshot);
    }
}
 
源代码16 项目: QrScan   文件: CaptureActivity.java
/**
 * 重新启动扫描
 */
public void restartCamera() {
    SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
    SurfaceHolder surfaceHolder = surfaceView.getHolder();
    initCamera(surfaceHolder);
    if (handler != null) {
        handler.restartPreviewAndDecode();
    }
}
 
源代码17 项目: Vitamio   文件: MediaPlayerSubtitle.java
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	if (!LibsChecker.checkVitamioLibs(this))
		return;
	setContentView(R.layout.subtitle1);
	tv = (TextView) findViewById(R.id.sub1);
	splayer = (SurfaceView) findViewById(R.id.surface);
	sholder = splayer.getHolder();
	sholder.setFormat(PixelFormat.RGBA_8888);
	sholder.addCallback(this);
}
 
源代码18 项目: DeviceConnect-Android   文件: RTSPPlayerActivity.java
private void changePlayerSize(int pictureWidth, int pictureHeight) {
    View root = findViewById(R.id.root);
    SurfaceView surfaceView = findViewById(R.id.surface_view);

    Size changeSize;
    Size viewSize = new Size(root.getWidth(), root.getHeight());
    changeSize = calculateViewSize(pictureWidth, pictureHeight, viewSize);

    ViewGroup.LayoutParams layoutParams = surfaceView.getLayoutParams();
    layoutParams.width = changeSize.getWidth();
    layoutParams.height = changeSize.getHeight();
    surfaceView.setLayoutParams(layoutParams);
}
 
源代码19 项目: Questor   文件: CameraSource.java
/**
 * Opens the camera and starts sending preview frames to the underlying detector.  The preview
 * frames are not displayed.
 *
 * @throws IOException if the camera's preview texture or display could not be initialized
 */
@RequiresPermission(Manifest.permission.CAMERA)
public CameraSource start() throws IOException {
    synchronized (mCameraLock) {
        if (mCamera != null) {
            return this;
        }

        mCamera = createCamera();

        // SurfaceTexture was introduced in Honeycomb (11), so if we are running and
        // old version of Android. fall back to use SurfaceView.
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            mDummySurfaceTexture = new SurfaceTexture(DUMMY_TEXTURE_NAME);
            mCamera.setPreviewTexture(mDummySurfaceTexture);
        } else {
            mDummySurfaceView = new SurfaceView(mContext);
            mCamera.setPreviewDisplay(mDummySurfaceView.getHolder());
        }
        mCamera.startPreview();

        mProcessingThread = new Thread(mFrameProcessor);
        mFrameProcessor.setActive(true);
        mProcessingThread.start();
    }
    return this;
}
 
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.main);

	mFrame = (LinearLayout) findViewById(R.id.frame);

	// Disable touches on mFrame
	mFrame.setEnabled(false);

	// Setup touch listener for taking pictures
	mFrame.setOnTouchListener(new View.OnTouchListener() {
		@Override
		public boolean onTouch(View v, MotionEvent event) {

			// Only respond to ACTION_UP
			if (event.getActionMasked() == (MotionEvent.ACTION_UP)) {

				// Take picture
				// Pass in shutterCallback and PictureCallback Objects
				mCamera.takePicture(mShutterCallback, null,
						mPictureCallback);

			}

			return true;
		}
	});

	// Setup SurfaceView for previewing camera image
	SurfaceView surfaceView = (SurfaceView) findViewById(R.id.cameraView);

	// Get SurfaceHolder for accessing the SurfaceView's Surface
	mSurfaceHolder = surfaceView.getHolder();

	// Set callback Object for the SurfaceHolder
	mSurfaceHolder.addCallback(mSurfaceHolderCallback);

}
 
@Override
protected void onResume() {
    super.onResume();
    Log.v(TAG, "onResume()");

    // CameraManager must be initialized here, not in onCreate().
    if (cameraManager == null) cameraManager = new CameraManager(getApplication());

    if (viewfinderView == null) {
        viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
        viewfinderView.setCameraManager(cameraManager);
    }

    showScanner();

    SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
    SurfaceHolder surfaceHolder = surfaceView.getHolder();
    if (hasSurface) {
        // The activity was paused but not stopped, so the surface still
        // exists. Therefore
        // surfaceCreated() won't be called, so init the camera here.
        initCamera(surfaceHolder);
    } else {
        // Install the callback and wait for surfaceCreated() to init the
        // camera.
        surfaceHolder.addCallback(this);
        surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
    }
}
 
源代码22 项目: grafika   文件: HardwareScalerActivity.java
/**
 * onClick handler for radio buttons.
 */
public void onRadioButtonClicked(View view) {
    int newSize;

    RadioButton rb = (RadioButton) view;
    if (!rb.isChecked()) {
        Log.d(TAG, "Got click on non-checked radio button");
        return;
    }

    switch (rb.getId()) {
        case R.id.surfaceSizeTiny_radio:
            newSize = SURFACE_SIZE_TINY;
            break;
        case R.id.surfaceSizeSmall_radio:
            newSize = SURFACE_SIZE_SMALL;
            break;
        case R.id.surfaceSizeMedium_radio:
            newSize = SURFACE_SIZE_MEDIUM;
            break;
        case R.id.surfaceSizeFull_radio:
            newSize = SURFACE_SIZE_FULL;
            break;
        default:
            throw new RuntimeException("Click from unknown id " + rb.getId());
    }
    mSelectedSize = newSize;

    int[] wh = mWindowWidthHeight[newSize];

    // Update the Surface size.  This causes a "surface changed" event, but does not
    // destroy and re-create the Surface.
    SurfaceView sv = (SurfaceView) findViewById(R.id.hardwareScaler_surfaceView);
    SurfaceHolder sh = sv.getHolder();
    Log.d(TAG, "setting size to " + wh[0] + "x" + wh[1]);
    sh.setFixedSize(wh[0], wh[1]);
}
 
源代码23 项目: sealtalk-android   文件: MultiVideoCallActivity.java
@Override
public void onRemoteUserLeft(String userId, RongCallCommon.CallDisconnectedReason reason) {
    //incoming状态,localViewUserId为空
    if (localViewUserId == null)
        return;
    if (localViewUserId.equals(userId)) {
        localViewContainer.removeAllViews();
        String currentUserId = RongIMClient.getInstance().getCurrentUserId();
        FrameLayout remoteVideoView = (FrameLayout) remoteViewContainer.findViewWithTag(currentUserId);
        localView = (SurfaceView) remoteVideoView.getChildAt(0);
        remoteVideoView.removeAllViews();
        localViewContainer.addView(localView);
        TextView topUserNameView = (TextView) topContainer.findViewById(R.id.rc_voip_user_name);
        UserInfo userInfo = RongContext.getInstance().getUserInfoFromCache(currentUserId);
        if (userInfo != null) {
            topUserNameView.setText(userInfo.getName());
        } else {
            topUserNameView.setText(currentUserId);
        }
        localViewUserId = currentUserId;
    }

    View singleRemoteView = remoteViewContainer.findViewWithTag(userId + "view");

    if (singleRemoteView == null)
        return;

    LinearLayout container = (LinearLayout) singleRemoteView.getParent();
    container.removeView(singleRemoteView);
    if (container.equals(remoteViewContainer2)) {
        if (remoteViewContainer1.getChildCount() > 0) {
            View childView = remoteViewContainer1.getChildAt(0);
            remoteViewContainer1.removeView(childView);
            remoteViewContainer2.addView(childView);
        }
    }
}
 
源代码24 项目: Camdroid   文件: ProcessFramesView.java
private void initView(Context context) {
    Log.d(TAG, "initView()");

    this.setBackgroundColor(this.getResources().getColor(
            android.R.color.black));

    SurfaceView view = new SurfaceView(context);
    view.setWillNotDraw(false);

    this.addView(view, 0);

    SurfaceHolder holder = view.getHolder();
    holder.addCallback(this);
}
 
源代码25 项目: OpenCV-AndroidSamples   文件: Tutorial1Activity.java
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    Log.i(TAG, "called onCreate");
    super.onCreate(savedInstanceState);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

    setContentView(R.layout.activity_tutorial1);

    mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.tutorial1_activity_java_surface_view);

    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);

    mOpenCvCameraView.setCvCameraViewListener(this);
}
 
源代码26 项目: pasm-yolov3-Android   文件: MainActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

    setContentView(R.layout.activity_main);
    validateCameraPermission();
    classifier = initClassifier();
    imageSaver = new ImageSaver();
    imageSaver.createFolderIfNotExist();
    mOpenCvCameraView= findViewById(R.id.cameraView1);
    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);
    mOpenCvCameraView.setCvCameraViewListener(this);

}
 
源代码27 项目: apollo-DuerOS   文件: CarlifeActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    EncryptSetupManager.getInstance();

    LogUtil.d(TAG, "onCreate");
    mTimeCarlifeStart = SystemClock.elapsedRealtime();
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_main);
    mRootView = (ViewGroup) findViewById(R.id.main_root_view);
    PreferenceUtil.getInstance().init(this);
    mCarLifeFragmentManager = new CarLifeFragmentManager(this);
    // initialize basefragment, must be called before using it's subclass
    BaseFragment.initBeforeAll(this);
    mCarLifeFragmentManager.showFragment(LaunchFragment.getInstance());
    mSurfaceView = (SurfaceView) findViewById(R.id.main_video_surface_view);
    mSurfaceView.getHolder().addCallback(this);
    mMainActivityHandler = new MsgMainActivityHandler();

    mLocationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);

    MsgHandlerCenter.registerMessageHandler(mMainActivityHandler);
    ErrorCodeReport.getInterface().init(this);
    mMainActivityHandler.sendEmptyMessageDelayed(CommonParams.MSG_CONNECT_INIT, 500);
    ControlTestWindow.getInstance().init(this, mRootView);
    SettingAboutWindow.getInstance().init(this, mRootView);

    initLaunchMode(getIntent());
    mTimeCarlifeInit = SystemClock.elapsedRealtime();
    LogUtil.d(TAG, "-QA_Test- OnCreate_InitTime = " + (mTimeCarlifeInit - mTimeCarlifeStart));

    DebugLogUtil.getInstance().init(this);
}
 
源代码28 项目: Fatigue-Detection   文件: EGLBase.java
EglSurface(final EGLBase egl, final Object surface) {
	if (DEBUG) Log.v(TAG, "EglSurface:");
	if (!(surface instanceof SurfaceView)
		&& !(surface instanceof Surface)
		&& !(surface instanceof SurfaceHolder)
		&& !(surface instanceof SurfaceTexture))
		throw new IllegalArgumentException("unsupported surface");
	mEgl = egl;
	mEglSurface = mEgl.createWindowSurface(surface);
       mWidth = mEgl.querySurface(mEglSurface, EGL14.EGL_WIDTH);
       mHeight = mEgl.querySurface(mEglSurface, EGL14.EGL_HEIGHT);
       if (DEBUG) Log.v(TAG, String.format("EglSurface:size(%d,%d)", mWidth, mHeight));
}
 
public CameraSourcePreview(Context context, AttributeSet attrs) {
    super(context, attrs);
    mContext = context;
    mStartRequested = false;
    mSurfaceAvailable = false;

    mSurfaceView = new SurfaceView(context);
    mSurfaceView.getHolder().addCallback(new SurfaceCallback());
    addView(mSurfaceView);
}
 
源代码30 项目: barterli_android   文件: ScanIsbnActivity.java
/**
 * Stop scanning for a barcode, and release the camera
 */
private void stopScanningForBarcode() {
    if (mDecoderActivityHandler != null) {
        mDecoderActivityHandler.quitSynchronously();
        mDecoderActivityHandler = null;
    }

    mCameraManager.closeDriver();

    if (!mHasSurface) {
        final SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
        final SurfaceHolder surfaceHolder = surfaceView.getHolder();
        surfaceHolder.removeCallback(this);
    }
}
 
源代码评论
动弹
沙发等你来抢
 类所在包
 同包方法