gpt4 book ai didi

android - 横向模式下的全屏 VideoView

转载 作者:太空狗 更新时间:2023-10-29 16:37:50 25 4
gpt4 key购买 nike

我希望在横向模式下将 VideoView 设置为全屏。我试过 this .它显示了左右边距。我想知道如何让 VideoView 全屏显示。

我的 .xml 文件

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<VideoView
android:id="@+id/videoViewN"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />
</RelativeLayout>

最佳答案

您可以将主题添加到 list 文件中的 Activity :

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

对于xml中的VideoView,更改

android:layout_height="wrap_content"

android:layout_height="fill_parent"

这将帮助您在视频 View 中实现全屏。希望对您有所帮助。

关于android - 横向模式下的全屏 VideoView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24200939/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com