android videoview 拉伸,拉伸填充VideoView,纵横比VideoView

本文探讨如何在Android中使VideoView填充屏幕并保持正确的纵横比。通过调整布局和设置VideoView属性,以期达到理想的显示效果。讨论了布局代码和设备上实际显示的不同,并提出了可能的解决方案,包括修改媒体记录器的宽高比。
摘要由CSDN通过智能技术生成

我试图拉伸视频以填充视频视图。目标是创建视图,在设备中看起来像第一张图片(就像它在布局预览中看到的一样)。拉伸填充VideoView,纵横比VideoView

这个问题的大部分答案都是指this link。

我试过这个,但我仍然没有填写视频视图。

这是我的布局代码:

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical"

android:background="@drawable/search_gren_screen">

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="horizontal" >

android:id="@+id/go_back"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_gravity="center"

android:layout_weight="1"

android:onClick="onclick"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值