android:视频作为背景视图

Sam*_* Z. 3 android-video-player

我想在视图的背景中播放视频.在视图中我想要一些其他视图,如按钮和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>
Run Code Online (Sandbox Code Playgroud)

请建议我怎么做到这一点.

谢谢.

Sha*_*afi 5

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