android.widget.MediaController.isShowing()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(88)

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

MediaController.isShowing介绍

暂无

代码示例

代码示例来源:origin: square/assertj-android

public MediaControllerAssert isNotShowing() {
  isNotNull();
  assertThat(actual.isShowing()) //
    .overridingErrorMessage("Expected to not be showing but was.") //
    .isFalse();
  return this;
 }
}

代码示例来源:origin: square/assertj-android

public MediaControllerAssert isShowing() {
 isNotNull();
 assertThat(actual.isShowing()) //
   .overridingErrorMessage("Expected to be showing but was not.") //
   .isTrue();
 return this;
}

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

@Override
  public boolean onTouch(View v, MotionEvent event) {
    if (mediaController == null) return false;
    if (mediaController.isShowing()) {
      mediaController.hide();
      showButtonPanel(true);
    } else {
      showButtonPanel(false);
      mediaController.show();
    }
    return false;
  }
});

代码示例来源:origin: pili-engineering/PLDroidShortVideo

@Override
public boolean onTouchEvent(MotionEvent event) {
  if (!mMediaController.isShowing()) {
    mMediaController.show(0);
  } else {
    mMediaController.hide();
  }
  return super.onTouchEvent(event);
}

代码示例来源:origin: com.squareup.assertj/assertj-android

public MediaControllerAssert isShowing() {
 isNotNull();
 assertThat(actual.isShowing()) //
   .overridingErrorMessage("Expected to be showing but was not.") //
   .isTrue();
 return this;
}

代码示例来源:origin: com.squareup.assertj/assertj-android

public MediaControllerAssert isNotShowing() {
  isNotNull();
  assertThat(actual.isShowing()) //
    .overridingErrorMessage("Expected to not be showing but was.") //
    .isFalse();
  return this;
 }
}

代码示例来源:origin: fire3/sailorcast

private void toggleControlsVisibility() {
  if (mediaController.isShowing()) {
    mediaController.hide();
    debugRootView.setVisibility(View.GONE);
  } else {
    showControls();
  }
}

代码示例来源:origin: sprylab/texturevideoview

private void toggleMediaControlsVisiblity() {
  if (mMediaController.isShowing()) {
    mMediaController.hide();
  } else {
    mMediaController.show();
  }
}

代码示例来源:origin: mrgames13/SplashScreen

private void toggleMediaControlsVisiblity() {
  if (mMediaController.isShowing()) {
    mMediaController.hide();
  } else {
    mMediaController.show();
  }
}

代码示例来源:origin: ExcaliburZ/ImitateBilibili

private void toggleMediaControlsVisiblity() {
  if (mMediaController.isShowing()) {
    mMediaController.hide();
  } else {
    mMediaController.show();
  }
}

代码示例来源:origin: upyun/android-player-sdk

private void toggleMediaControlsVisiblity() {
  if (mMediaController.isShowing()) {
    mMediaController.hide();
  } else {
    mMediaController.show();
  }
}

代码示例来源:origin: ExcaliburZ/ImitateBilibili

public void surfaceChanged(SurfaceHolder holder, int format, int w,
              int h) {
  mSurfaceHolder = holder;
  if (mMediaPlayer != null) {
    mMediaPlayer.setDisplay(mSurfaceHolder);
  }
  mSurfaceWidth = w;
  mSurfaceHeight = h;
  boolean isValidState = (mTargetState == STATE_PLAYING);
  boolean hasValidSize = (mVideoWidth == w && mVideoHeight == h);
  if (mMediaPlayer != null && isValidState && hasValidSize) {
    if (mSeekWhenPrepared != 0)
      seekTo(mSeekWhenPrepared);
    start();
    if (mMediaController != null) {
      if (mMediaController.isShowing())
        mMediaController.hide();
      mMediaController.show();
    }
  }
}

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

if (mMediaController.isShowing()) {
  mMediaController.hide();
} else {

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

if(mMediaController.isShowing()) {
  mMediaController.hide();
} else {

相关文章