Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android: video as background view

I want to play video in background of the view.In view i want to some other view like button and textview, can it is possible to do that? i have try using the following code <

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>

Please suggest me how can it possible to do it.

Thank you.

like image 579
Sameer Z. Avatar asked Jan 18 '23 23:01

Sameer Z.


1 Answers

Not sure if you can put a videoView in background. The better option would be to use a frame layout with a transparent background and put your other views on the top of it.

like image 114
Shafi Avatar answered May 16 '23 07:05

Shafi