gpt4 book ai didi

android-video-player - 安卓 : video as background view

转载 作者:行者123 更新时间:2023-12-04 08:22:18 24 4
gpt4 key购买 nike

我想在 View 的背景中播放视频。在 View 中我想要一些其他 View ,如按钮和 TextView ,可以这样做吗?
我尝试使用以下代码
<

RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">

<VideoView
android:scrollbars="none"
android:clickable="false"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:fitsSystemWindows="true"
android:id="@+id/VideoView">
</VideoView>
<TextView
android:text="hi123"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>

</RelativeLayout>

请建议我怎么可能做到这一点。

谢谢你。

最佳答案

不确定您是否可以在后台放置一个 videoView。
更好的选择是使用具有透明背景的框架布局并将其他 View 放在其顶部。

关于android-video-player - 安卓 : video as background view,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7074600/

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