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

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

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

MediaController.show介绍

暂无

代码示例

代码示例来源:origin: Rukey7/MvpApp

@Override
public void show() {
  super.show();
  if (mActionBar != null)
    mActionBar.show();
}

代码示例来源:origin: jjdxmashl/jjdxm_ijkplayer

@Override
public void show() {
  super.show();
  if (mActionBar != null)
    mActionBar.show();
}

代码示例来源: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: stackoverflow.com

public boolean onTouchEvent(MotionEvent event) {
 mediaController.show();
 return false;
  public void run() {
   mediaController.setEnabled(true);
   mediaController.show();

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

mcontroller.show();
return false;
    mcontroller.show();

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

final VideoView video = (VideoView) findViewById(R.id.videoplayer);
     final MediaController controller = new MediaController(this);
     video.setVideoURI(Uri.parse(getIntent().getStringExtra("url")));
     video.setMediaController(controller);
     controller.setMediaPlayer(video);
     video.setOnPreparedListener(new OnPreparedListener() {
         public void onPrepared(MediaPlayer mp) {
           int duration = video.getDuration();
           video.requestFocus();
           video.start();
           controller.show();
         }
       });

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

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

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

videoView.requestFocus();
videoView.start();          
mc.show();

代码示例来源:origin: weexteam/weex-hackernews

@Override
 public void onPrepared(MediaPlayer mediaPlayer) {
  if (WXEnvironment.isApkDebugable()) {
   WXLogUtils.d("Video", "onPrepared");
  }
  video.getProgressBar().setVisibility(View.GONE);
  mPrepared = true;
  if (mAutoPlay) {
   video.start();
  }
  //callback from video view, so videoview should not null
  WXVideoView videoView = video.getVideoView();
  videoView.seekTo(5);
  if (video.getMediaController() != null) {
   if (!mStopped) {
    video.getMediaController().show(3);
   } else {
    video.getMediaController().hide();
   }
  }
  mStopped = false;
 }
});

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

VideoView videoView;   
MediaController mc;  

videoView.setMediaController(new MediaController(this)  
  {
    public void hide()
    {
      System.out.println("HIDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEHELLLOO");
      mc.show();
    }
  });

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

private void showControls() {
  mediaController.show(0);
  debugRootView.setVisibility(View.VISIBLE);
}

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

final MediaController mc = new MediaController(this);
video.setMediaController(new MediaController(this) {
  @Override
  public void hide()
  {
    mc.show();
  }

  }); 

video.setMediaController(mc);

代码示例来源:origin: yugai/DouYu-Android

@Override
public void show() {
  super.show();
  if (mActionBar != null)
    mActionBar.show();
}

代码示例来源:origin: konradrenner/kolabnotes-android

public void run() {
    mediaController.setEnabled(true);
    mediaController.show();
  }
});

代码示例来源:origin: oubowu/YinyuetaiPlayer

@Override
public void show() {
  super.show();
  if (mActionBar != null)
    mActionBar.show();
}

代码示例来源:origin: Rukey7/IjkPlayerView

@Override
public void show() {
  super.show();
  if (mActionBar != null)
    mActionBar.show();
}

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

// this can be path on file system
String path="/adf.mp4"  ; 
 public void playVideo() { 
   MediaController mediaController = new MediaController(this);
   mediaController.setMediaPlayer(videoView);
   videoView.setVideoPath(path);   
   videoView.setMediaController(mediaController);
   videoView.requestFocus();
   videoView.start();
   mediaController.show();

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

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

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

String urlVideo = <your rtspURL>
VideoView video = (VideoView)findViewById(R.id.VideoView01);
Log.d(tag , urlVideo);
video.setVideoURI(Uri.parse(urlVideo));
MediaController mc = new MediaController(this);
video.setMediaController(mc);
video.requestFocus();
video.start();
mc.show();

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

VideoView vv = (VideoView)this.findViewById(R.id.videoview);
Uri uri = Uri.parse(path);
MediaController mediaController = new MediaController(this);
mediaController.setMediaPlayer(vv);
vv.setVideoURI(uri);
vv.setMediaController(mediaController);
vv.start();
mediaController.show();

相关文章