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

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

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

TextureView.setOpaque介绍

暂无

代码示例

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

/**
 * Indicates whether the content of this GifTextureView is opaque. The
 * content is assumed to be <b>non-opaque</b> by default (unlike {@link TextureView}.
 * View that is known to be opaque can take a faster drawing case than non-opaque one.<br>
 * Opacity change will cause animation to restart.
 *
 * @param opaque True if the content of this GifTextureView is opaque,
 *               false otherwise
 */
@Override
public void setOpaque(boolean opaque) {
  if (opaque != isOpaque()) {
    super.setOpaque(opaque);
    setInputSource(mInputSource);
  }
}

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

private void init(AttributeSet attrs, int defStyleAttr, int defStyleRes) {
  if (attrs != null) {
    final int scaleTypeIndex = attrs.getAttributeIntValue(GifViewUtils.ANDROID_NS, "scaleType", -1);
    if (scaleTypeIndex >= 0 && scaleTypeIndex < sScaleTypeArray.length) {
      mScaleType = sScaleTypeArray[scaleTypeIndex];
    }
    final TypedArray textureViewAttributes = getContext().obtainStyledAttributes(attrs, R.styleable
        .GifTextureView, defStyleAttr, defStyleRes);
    mInputSource = findSource(textureViewAttributes);
    super.setOpaque(textureViewAttributes.getBoolean(R.styleable.GifTextureView_isOpaque, false));
    textureViewAttributes.recycle();
    viewAttributes = new GifViewUtils.GifViewAttributes(this, attrs, defStyleAttr, defStyleRes);
  } else {
    super.setOpaque(false);
    viewAttributes = new GifViewUtils.GifViewAttributes();
  }
  if (!isInEditMode()) {
    mRenderThread = new RenderThread(this);
    if (mInputSource != null) {
      mRenderThread.start();
    }
  }
}

代码示例来源:origin: stackoverflow.com

mTextureView.setOpaque(false);

代码示例来源:origin: googlesamples/android-MediaRouter

mTextureView.getLayoutParams().width = mWidth;
mTextureView.getLayoutParams().height = mHeight;
mTextureView.setOpaque(false);
mTextureView.setSurfaceTextureListener(mSurfaceTextureListener);

相关文章