本文整理了Java中android.view.TextureView.setOpaque()
方法的一些代码示例,展示了TextureView.setOpaque()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextureView.setOpaque()
方法的具体详情如下:
包路径:android.view.TextureView
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!