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

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

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

TextureView.setVisibility介绍

暂无

代码示例

代码示例来源:origin: Affectiva/affdexme-android

void removeVideo() {
  if (textureView != null) {
    textureView.setVisibility(GONE);
    videoHolder.removeView(textureView);
    textureView = null;
  }
  videoOverlay.setVisibility(GONE);
}

代码示例来源:origin: Affectiva/affdexme-android

void displayVideo(TextureView videoView) {
  textureView = videoView;
  ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(textureView.getLayoutParams());
  // set the video to the same height and width of the actual bitmap inside the imageview
  int[] imageAttr = ImageHelper.getBitmapPositionInsideImageView(imageView);
  params.width = imageAttr[2]; //width
  params.height = imageAttr[3]; //height
  textureView.setLayoutParams(params);
  videoHolder.addView(textureView);
  textureView.setVisibility(VISIBLE);
  videoOverlay.setVisibility(VISIBLE);
}

代码示例来源:origin: AriaLyy/BlogDemo

@Override protected void bindData(MyHolder holder, int position, Entity item) {
 if (!item.isVideo) {
  Glide.with(getContext()).load(item.url).into(((ImgHolder) holder).img);
 } else {
  mUrl = item.url;
  VideoHolder helper = (VideoHolder) holder;
  mPb = helper.pb;
  if (mPlayer == null) {
   mPb.setVisibility(View.VISIBLE);
  }
  helper.video.setVisibility(View.VISIBLE);
  ViewGroup.LayoutParams lp = helper.video.getLayoutParams();
  lp.height = 600;
  helper.video.setLayoutParams(lp);
  helper.video.setSurfaceTextureListener(this);
 }
}

代码示例来源:origin: Affectiva/affdexme-android

textureView.setVisibility(View.GONE);
textureView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
textureView.setSurfaceTextureListener(new TextureView.SurfaceTextureListener() {

相关文章