package edu.alaska.gina.feeder.gina_puffinfeeder_android_viewer;

import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.provider.MediaStore;
import android.widget.MediaController;
import android.widget.VideoView;

/**
 * Created by Bobby on 6/6/2014.
 */
public class FullscreenVideoPlayerActivity extends Activity {
    private MediaController MC;
    private VideoView movie;

    @Override
    protected void onRestoreInstanceState(Bundle savedInstanceState) {
        super.onRestoreInstanceState(savedInstanceState);
        movie.seekTo(savedInstanceState.getInt("seek_pos"));
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fullscreen_video_player);

        movie = (VideoView) findViewById(R.id.fullscreen_content);
        movie.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
            @Override
            public void onPrepared(MediaPlayer mp) {
                mp.setLooping(true);
            }
        });
        if (getIntent().getExtras() != null)
            movie.setVideoPath(getIntent().getExtras().getString("url"));
        else
            movie.setVideoPath("http://feeder.gina.alaska.edu/feeds/radar-uaf-barrow-seaice-images/movies/3464_radar-uaf-barrow-seaice-images_2014-6-5_1-day-animation.webm");

        MC = new MediaController(this);
        MC.setAnchorView(movie);

        movie.setMediaController(MC);
        movie.start();
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        outState.putInt("seek_pos", movie.getCurrentPosition());
        super.onSaveInstanceState(outState);
    }
}

@@ -184,16 +184,42 @@
 aStore;%0A
+import android.view.View;%0A
 import a
@@ -386,16 +386,96 @@
 ivity %7B%0A
+    private static final int UI_HIDE_OPTIONS = View.SYSTEM_UI_FLAG_LOW_PROFILE;%0A
     priv
@@ -1644,32 +1644,608 @@
 start();%0A    %7D%0A%0A
+    @Override%0A    protected void onStart() %7B%0A        super.onStart();%0A        MC.setOnClickListener(new View.OnClickListener() %7B%0A            @Override%0A            public void onClick(View v) %7B%0A                v.setSystemUiVisibility(UI_HIDE_OPTIONS);%0A            %7D%0A        %7D);%0A%0A        movie.setOnClickListener(new View.OnClickListener() %7B%0A            @Override%0A            public void onClick(View v) %7B%0A                v.setSystemUiVisibility(UI_HIDE_OPTIONS);%0A            %7D%0A        %7D);%0A%0A        this.getWindow().getDecorView().setSystemUiVisibility(UI_HIDE_OPTIONS);%0A    %7D%0A%0A
     @Override%0A  

Make System UI Dim in Video Player