Skip to content

VideoView is not working in window. #28

@ankur99999

Description

@ankur99999

I modified your StandOutExampleActivity to show VideoView in frame, I also modify my XML but VideoView is not showing in frame.

Here is the modified files.

StandOutExampleActivity

    package wei.mark.example;

    import wei.mark.standout.StandOutWindow;
    import android.app.Activity;
    import android.os.Bundle;
    import android.widget.MediaController;
    import android.widget.VideoView;

    public class StandOutExampleActivity extends Activity {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);

            StandOutWindow.closeAll(this, SimpleWindow.class);  
            StandOutWindow
                    .show(this, SimpleWindow.class, StandOutWindow.DEFAULT_ID);
            // show a MultiWindow, SimpleWindow
            setContentView(R.layout.simple);
            final VideoView videoView = (VideoView) findViewById(R.id.videoView1);
                 videoView.setVideoPath("http://10.0.2.2/a.mp4");

             // MediaController mediaController = new MediaController(this);
                //  mediaController.setAnchorView(videoView);
              //    videoView.setMediaController(mediaController);
            videoView.start();
            /*
             * StandOutWindow.show(this, StandOutMostBasicWindow.class,
             * StandOutWindow.DEFAULT_ID);
             */

            finish();
        }
    }

simple.xml

    <?xml version="1.0" encoding="utf-8"?>
    <merge xmlns:android="http://schemas.android.com/apk/res/android" >

        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="128dp"
            android:background="#aaff0000"
            android:orientation="vertical"
            android:padding="8dp" >

            <VideoView
                android:id="@+id/videoView1"
                android:layout_width="200dp"
                android:layout_height="200dp" />

            <ImageView
                android:id="@+id/imageView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_alignParentTop="true"
                android:src="@drawable/close" />

        </RelativeLayout>

    </merge> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions