拉丁的传说
2018-09-12 15:11:55浏览 5492
android vitamio videoview全屏主要通过LayoutParams 类来隐藏掉系统通知栏、,如下代码:
if(!fullscreen){//设置RelativeLayout的全屏模式
RelativeLayout.LayoutParams layoutParams=
new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
mVideoView01.setLayoutParams(layoutParams);
fullscreen = true;//改变全屏/窗口的标记
}else{//设置RelativeLayout的窗口模式
RelativeLayout.LayoutParams lp=new RelativeLayout.LayoutParams(320,240);
lp.addRule(RelativeLayout.CENTER_IN_PARENT);
mVideoView01.setLayoutParams(lp);
fullscreen = false;//改变全屏/窗口的标记
}
Vitamio 能够流畅播放720P甚至1080P高清MKV,FLV,MP4,MOV,TS,RMVB等常见格式的视频,还可以在 Android 上支持 MMS, RTSP, RTMP, HLS(m3u8) 等常见的多种视频流媒体协议,包括点播与直播。支持 ARMv6 和 ARMv7 两种 ARM CPU,同时对 VFP, VFPv3, NEON 等指令集都做相应优化。
原文链接:http://www.apkbus.com/blog-914653-68404.html