本文整理汇总了Java中io.vov.vitamio.widget.VideoView.VIDEO_LAYOUT_ORIGIN属性的典型用法代码示例。如果您正苦于以下问题:Java VideoView.VIDEO_LAYOUT_ORIGIN属性的具体用法?Java VideoView.VIDEO_LAYOUT_ORIGIN怎么用?Java VideoView.VIDEO_LAYOUT_ORIGIN使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类io.vov.vitamio.widget.VideoView
的用法示例。
在下文中一共展示了VideoView.VIDEO_LAYOUT_ORIGIN属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: changeLayout
public void changeLayout(View view) {
mVideoLayout++;
if (mVideoLayout == 4) {
mVideoLayout = 0;
}
switch (mVideoLayout) {
case 0:
mVideoLayout = VideoView.VIDEO_LAYOUT_ORIGIN;
view.setBackgroundResource(R.drawable.mediacontroller_sreen_size_100);
break;
case 1:
mVideoLayout = VideoView.VIDEO_LAYOUT_SCALE;
view.setBackgroundResource(R.drawable.mediacontroller_screen_fit);
break;
case 2:
mVideoLayout = VideoView.VIDEO_LAYOUT_STRETCH;
view.setBackgroundResource(R.drawable.mediacontroller_screen_size);
break;
case 3:
mVideoLayout = VideoView.VIDEO_LAYOUT_ZOOM;
view.setBackgroundResource(R.drawable.mediacontroller_sreen_size_crop);
break;
}
mVideoView.setVideoLayout(mVideoLayout, 0);
}
示例2: toggleVideoLayout
/**
* 切换视频布局
*/
private void toggleVideoLayout() {
currentVideoLayout++;
if (currentVideoLayout > VideoView.VIDEO_LAYOUT_ZOOM) {
currentVideoLayout = VideoView.VIDEO_LAYOUT_ORIGIN;
}
mVideoView.setVideoLayout(currentVideoLayout, 0);
}
示例3: onDoubleTap
/** 双击 */
@Override
public boolean onDoubleTap(MotionEvent e) {
if (mLayout == VideoView.VIDEO_LAYOUT_ZOOM)
mLayout = VideoView.VIDEO_LAYOUT_ORIGIN;
else
mLayout++;
if (mVideoView != null)
mVideoView.setVideoLayout(mLayout, 0);
return true;
}