android.view.TextureView.onDetachedFromWindow()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(167)

本文整理了Java中android.view.TextureView.onDetachedFromWindow()方法的一些代码示例,展示了TextureView.onDetachedFromWindow()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextureView.onDetachedFromWindow()方法的具体详情如下:
包路径:android.view.TextureView
类名称:TextureView
方法名:onDetachedFromWindow

TextureView.onDetachedFromWindow介绍

暂无

代码示例

代码示例来源:origin: cats-oss/android-gpuimage

/**
 * This method is used as part of the View class and is not normally
 * called or subclassed by clients of GLTextureView.
 * Must not be called before a renderer has been set.
 */
@Override
protected void onDetachedFromWindow() {
  if (LOG_ATTACH_DETACH) {
    Log.d(TAG, "onDetachedFromWindow");
  }
  if (glThread != null) {
    glThread.requestExitAndWait();
  }
  detached = true;
  super.onDetachedFromWindow();
}

代码示例来源:origin: Rukey7/MvpApp

@Override
protected void onDetachedFromWindow() {
  mSurfaceCallback.willDetachFromWindow();
  super.onDetachedFromWindow();
  mSurfaceCallback.didDetachFromWindow();
}

代码示例来源:origin: jiajunhui/PlayerBase

@Override
protected void onDetachedFromWindow() {
  super.onDetachedFromWindow();
  PLog.d(TAG,"onTextureViewDetachedFromWindow");
  //fixed bug on before android 4.4
  //modify 2018/11/16
  //java.lang.RuntimeException: Error during detachFromGLContext (see logcat for details)
  //   at android.graphics.SurfaceTexture.detachFromGLContext(SurfaceTexture.java:215)
  if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT){
    release();
  }
}

代码示例来源:origin: koral--/android-gif-drawable

@Override
protected void onDetachedFromWindow() {
  mRenderThread.dispose(this, null);
  super.onDetachedFromWindow();
  final SurfaceTexture surfaceTexture = getSurfaceTexture();
  if (surfaceTexture != null) {
    surfaceTexture.release();
  }
}

代码示例来源:origin: w1123440793/VideoListDemo

@Override
protected void onDetachedFromWindow() {
  mSurfaceCallback.willDetachFromWindow();
  super.onDetachedFromWindow();
  mSurfaceCallback.didDetachFromWindow();
}

代码示例来源:origin: yqritc/Android-ScalableVideoView

@Override
protected void onDetachedFromWindow() {
  super.onDetachedFromWindow();
  if (mMediaPlayer == null) {
    return;
  }
  if (isPlaying()) {
    stop();
  }
  release();
}

代码示例来源:origin: yqritc/Android-ScalableVideoView

@Override
protected void onDetachedFromWindow() {
  super.onDetachedFromWindow();
  if (mMediaPlayer == null) {
    return;
  }
  if (isPlaying()) {
    stop();
  }
  release();
}

代码示例来源:origin: CarGuo/RecordWave

@Override
protected void onDetachedFromWindow() {
  super.onDetachedFromWindow();
  mIsDraw = false;
  if (mBackgroundBitmap != null && !mBackgroundBitmap.isRecycled()) {
    mBackgroundBitmap.recycle();
  }
}

代码示例来源:origin: zolad/BubbleTextureView

@Override
protected void onDetachedFromWindow() {
  if (LOG_ATTACH_DETACH) {
    Log.d(TAG, "onDetachedFromWindow");
  }
  if (mGLThread != null) {
    mGLThread.requestExitAndWait();
  }
  mDetached = true;
  super.onDetachedFromWindow();
}

代码示例来源:origin: cachapa/AerialDream

@Override
protected void onDetachedFromWindow() {
  pause();
  super.onDetachedFromWindow();
}

代码示例来源:origin: leftcoding/GankLy

@Override
protected void onDetachedFromWindow() {
  mSurfaceCallback.willDetachFromWindow();
  super.onDetachedFromWindow();
  mSurfaceCallback.didDetachFromWindow();
}

代码示例来源:origin: oubowu/YinyuetaiPlayer

@Override
protected void onDetachedFromWindow() {
  mSurfaceCallback.willDetachFromWindow();
  super.onDetachedFromWindow();
  mSurfaceCallback.didDetachFromWindow();
}

代码示例来源:origin: hejunlin2013/LivePlayback

@Override
protected void onDetachedFromWindow() {
  mSurfaceCallback.willDetachFromWindow();
  super.onDetachedFromWindow();
  mSurfaceCallback.didDetachFromWindow();
}

代码示例来源:origin: ChillingVan/android-openGL-canvas

@Override
protected void onDetachedFromWindow() {
  Loggers.d("BaseGLTextureView", "onDetachedFromWindow: ");
  if (mGLThread != null) {
    mGLThread.requestExitAndWait();
  }
  super.onDetachedFromWindow();
}

代码示例来源:origin: Rukey7/IjkPlayerView

@Override
protected void onDetachedFromWindow() {
  mSurfaceCallback.willDetachFromWindow();
  super.onDetachedFromWindow();
  mSurfaceCallback.didDetachFromWindow();
}

代码示例来源:origin: wanliyang1990/WliveTV

@Override
protected void onDetachedFromWindow() {
  mSurfaceCallback.willDetachFromWindow();
  super.onDetachedFromWindow();
  mSurfaceCallback.didDetachFromWindow();
}

代码示例来源:origin: fanhua1994/FastVideoPlayer

@Override
protected void onDetachedFromWindow() {
  mSurfaceCallback.willDetachFromWindow();
  super.onDetachedFromWindow();
  mSurfaceCallback.didDetachFromWindow();
}

代码示例来源:origin: Dreamxiaoxuan/AndroidTvDemo

@Override
protected void onDetachedFromWindow()
{
  mSurfaceCallback.willDetachFromWindow();
  super.onDetachedFromWindow();
  mSurfaceCallback.didDetachFromWindow();
}

代码示例来源:origin: pondurii/vrVideo

@Override
protected void onDetachedFromWindow() {
  if (LOG_ATTACH_DETACH) {
    Log.d(TAG, "onDetachedFromWindow");
  }
  if (mGLThread != null) {
    mGLThread.requestExitAndWait();
  }
  mDetached = true;
  mRendererDelegate.mRenderer.onRenderSurfaceDestroyed(null);
  super.onDetachedFromWindow();
}

代码示例来源:origin: ymcao/YaPlayer

@Override
protected void onDetachedFromWindow() {
  super.onDetachedFromWindow();
  Logger.i(tag, "onDetachedFromWindow");
  if (isInEditMode()) {
    return;
  }
  setKeepScreenOn(false);
  if (videoMediaLogic != null)
    videoMediaLogic.onAttachedToWindow(false);
}
private boolean isRotation = true;

相关文章