Code example for VideoView

Methods: start

0
        mVideoView = (VideoView)findViewById(R.id.video_view);
        mMediaController = new MediaController(this);
        mVideoView.setMediaController(mMediaController);
        mVideoView.setOnPreparedListener(new OnPreparedListener() {
            public void onPrepared(MediaPlayer mp) {
                mVideoView.start();
                showTelop(); 
            } 
        }); 
 
        mFrameLayout = (FrameLayout)findViewById(R.id.frame_layout);
    } 
 
    private void showTelop() { 
        TextView telop = new TextView(this);
        telop.setText("TextViewをVideoViewに重ねます");
        telop.setTextColor(Color.RED);
        telop.setTextSize(40);
        telop.setTypeface(Typeface.DEFAULT, 1);
        mFrameLayout.addView(telop);
Contextual code suggestions in your IDE  Get Codota for Java