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

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

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

SurfaceView.setVisibility介绍

暂无

代码示例

代码示例来源:origin: florent37/CameraFragment

private void displayImage() {
  videoPreviewContainer.setVisibility(View.GONE);
  surfaceView.setVisibility(View.GONE);
  showImagePreview();
  ratioChanger.setText(ratioLabels[currentRatioIndex]);
}

代码示例来源:origin: HotBitmapGG/bilibili-android-client

stopAnim();
isPlay = true;
videoView.setVisibility(View.VISIBLE);
mRightPlayBtn.setImageResource(R.drawable.ic_tv_stop);
mBottomPlayBtn.setImageResource(R.drawable.ic_portrait_stop);

代码示例来源:origin: TeamNewPipe/NewPipe

surfaceView.setVisibility(View.GONE);
  endScreen.setVisibility(View.VISIBLE);
  playbackEndTime.setVisibility(View.VISIBLE);
  surfaceView.setVisibility(View.GONE);
  endScreen.setVisibility(View.VISIBLE);
  playbackLiveSync.setVisibility(View.VISIBLE);
  surfaceView.setVisibility(View.VISIBLE);
  endScreen.setVisibility(View.GONE);
  playbackLiveSync.setVisibility(View.VISIBLE);
  surfaceView.setVisibility(View.VISIBLE);
default:
  endScreen.setVisibility(View.GONE);

代码示例来源:origin: blockchain/Android-Merchant-App

public void showSurfaceView() {
  mSurfaceView.setVisibility(View.VISIBLE);
}

代码示例来源:origin: blockchain/Android-Merchant-App

public void hideSurfaceView() {
  mSurfaceView.setVisibility(View.INVISIBLE);
}

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

private void updateContents() {
  // Show either the content in the main activity or the content in the presentation
  if (mPresentation != null) {
    mLayout.setVisibility(View.GONE);
    mSurfaceView.setVisibility(View.GONE);
  } else {
    mLayout.setVisibility(View.VISIBLE);
    mSurfaceView.setVisibility(View.VISIBLE);
  }
}

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

@Override
  public void onClick(View v) {
    if (cameraPreview.getVisibility() == View.VISIBLE) {
      cameraPreview.setVisibility(View.INVISIBLE);
      surfaceViewVisibilityButton.setText("SHOW SURFACE VIEW");
    } else {
      cameraPreview.setVisibility(View.VISIBLE);
      surfaceViewVisibilityButton.setText("HIDE SURFACE VIEW");
    }
  }
});

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

// Add a SurfaceView to prevent flickering when the video is loaded later.
SurfaceView surfaceView = new SurfaceView(getActivity());
surfaceView.setVisibility(View.GONE);
container.addView(surfaceView, new ViewGroup.LayoutParams(0, 0));

代码示例来源:origin: vbier/habpanelviewer

public void updateMotionPreferences() {
  final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);
  if (mCam != null) {
    mCam.updateFromPreferences(prefs);
  }
  if (mMotionDetector != null) {
    mMotionDetector.updateFromPreferences(prefs);
  }
  SurfaceView motionView = findViewById(R.id.motionView);
  boolean showPreview = prefs.getBoolean("pref_motion_detection_preview", false);
  if (showPreview) {
    motionView.setVisibility(View.VISIBLE);
  } else {
    motionView.setVisibility(View.INVISIBLE);
  }
}

代码示例来源:origin: Car-eye-team/Car-eye-device

@Override
  public void onClick(View v) {
    if (display) {
      seekbarView.setVisibility(View.GONE);
      playbarView.setVisibility(View.GONE);
      display = false;
    } else {
      seekbarView.setVisibility(View.VISIBLE);
      playbarView.setVisibility(View.VISIBLE);
      pView.setVisibility(View.VISIBLE);
      ViewGroup.LayoutParams lp = pView.getLayoutParams();
      lp.height = LayoutParams.FILL_PARENT;
      lp.width = LayoutParams.FILL_PARENT;
      pView.setLayoutParams(lp);
      display = true;
    }
  }
});

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

@Override
public void release() {
  super.release();
  // dismiss presentation display
  if (mPresentation != null) {
    Log.i(TAG, "Dismissing presentation because the activity is no longer visible.");
    mPresentation.dismiss();
    mPresentation = null;
  }
  // remove surface holder callback
  SurfaceHolder holder = mSurfaceView.getHolder();
  holder.removeCallback(this);
  // hide the surface view when SurfaceViewPlayer is destroyed
  mSurfaceView.setVisibility(View.GONE);
  mLayout.setVisibility(View.GONE);
}

代码示例来源:origin: sealtalk/sealtalk-android

@Override
public void onRemoteCameraDisabled(String userId, boolean muted) {
  if (!muted) {
    if (localViewUserId.equals(userId)) {
      localView.setVisibility(View.INVISIBLE);
    } else {
      remoteViewContainer.findViewWithTag(userId).findViewWithTag(CallKitUtils.getStitchedContent(userId, REMOTE_FURFACEVIEW_TAG)).setVisibility(View.INVISIBLE);
    }
  } else {
    if (localViewUserId.equals(userId)) {
      localView.setVisibility(View.VISIBLE);
    } else {
      remoteViewContainer.findViewWithTag(userId).findViewWithTag(CallKitUtils.getStitchedContent(userId, REMOTE_FURFACEVIEW_TAG)).setVisibility(View.VISIBLE);
    }
  }
}

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

public void onClick(View v) {
  if (sv.getVisibility() == View.GONE) {
    sv.setVisibility(View.VISIBLE);
    final Animation show = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.show_video);
    show_video.startAnimation(show);
            sv.setVisibility(View.GONE);

代码示例来源:origin: dividiti/crowdsource-video-experiments-on-android

try {
  surfaceView.setVisibility(View.VISIBLE);
  surfaceView.setEnabled(true);

代码示例来源:origin: rsiebert/TVHClient

Timber.d("Player is idle");
statusTextView.setVisibility(View.GONE);
playerSurfaceView.setVisibility(View.VISIBLE);
break;
Timber.d("Player is ready");
statusTextView.setVisibility(View.GONE);
playerSurfaceView.setVisibility(View.VISIBLE);
break;
playerSurfaceView.setVisibility(View.GONE);
statusTextView.setVisibility(View.VISIBLE);
statusTextView.setText("Player is buffering");

代码示例来源:origin: sealtalk/sealtalk-android

public void onDisableCameraBtnClick(View view) {
  TextView text = (TextView) bottomButtonContainer.findViewById(R.id.rc_voip_disable_camera_text);
  String currentUserId = RongIMClient.getInstance().getCurrentUserId();
  RongCallClient.getInstance().setEnableLocalVideo(view.isSelected());
  if (view.isSelected()) {
    text.setText(R.string.rc_voip_disable_camera);
    if (localViewUserId.equals(currentUserId)) {
      localView.setVisibility(View.VISIBLE);
    } else {
      remoteViewContainer.findViewWithTag(currentUserId).findViewWithTag(CallKitUtils.getStitchedContent(currentUserId, REMOTE_FURFACEVIEW_TAG)).setVisibility(View.VISIBLE);
    }
  } else {
    text.setText(R.string.rc_voip_enable_camera);
    if (localViewUserId.equals(currentUserId)) {
      localView.setVisibility(View.INVISIBLE);
    } else {
      remoteViewContainer.findViewWithTag(currentUserId).findViewWithTag(CallKitUtils.getStitchedContent(currentUserId, REMOTE_FURFACEVIEW_TAG)).setVisibility(View.INVISIBLE);
    }
  }
  view.setSelected(!view.isSelected());
  isMuteCamera = view.isSelected();
}

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

lp.addRule(RelativeLayout.CENTER_IN_PARENT);
sv.setLayoutParams(lp);
sv.setVisibility(View.VISIBLE);
already_created = true;

代码示例来源:origin: FauDroids/Bored-Rudolf

surfaceView.setVisibility(View.VISIBLE);

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

surfaceView.setVisibility(View.VISIBLE);
      surfaceView.setVisibility(View.GONE);

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

surfaceView.setVisibility(View.VISIBLE);
rltControls.setVisibility(View.VISIBLE);
surfaceView.setVisibility(View.GONE);
rltControls.setVisibility(View.GONE);

相关文章