diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2012-08-05 15:13:50 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2012-08-05 15:13:50 +0200 |
commit | add5ce69d36a64c1f7dabc8262f5d5bd2a5a6715 (patch) | |
tree | f173385c57b0de6f44c1e6dd89a9000133573f37 /src/de/danoeh/antennapod/activity/VideoplayerActivity.java | |
parent | 3bcd77c0d291485f4ddc80ce20d7f6e5874b2cb6 (diff) | |
download | AntennaPod-add5ce69d36a64c1f7dabc8262f5d5bd2a5a6715.zip |
Prevented videooverlay from hiding while the user is touching the
video overlay
Diffstat (limited to 'src/de/danoeh/antennapod/activity/VideoplayerActivity.java')
-rw-r--r-- | src/de/danoeh/antennapod/activity/VideoplayerActivity.java | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/de/danoeh/antennapod/activity/VideoplayerActivity.java b/src/de/danoeh/antennapod/activity/VideoplayerActivity.java index ba1e434d0..34cb3aec9 100644 --- a/src/de/danoeh/antennapod/activity/VideoplayerActivity.java +++ b/src/de/danoeh/antennapod/activity/VideoplayerActivity.java @@ -12,9 +12,11 @@ import android.util.Log; import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.View; +import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.widget.LinearLayout; +import android.widget.SeekBar; import android.widget.VideoView; public class VideoplayerActivity extends MediaplayerActivity implements @@ -54,6 +56,7 @@ public class VideoplayerActivity extends MediaplayerActivity implements videoview.getHolder().addCallback(this); videoview.setOnClickListener(playbuttonListener); videoview.setOnTouchListener(onVideoviewTouched); + setupVideoControlsToggler(); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); @@ -100,7 +103,7 @@ public class VideoplayerActivity extends MediaplayerActivity implements } } }; - + @SuppressLint("NewApi") void setupVideoControlsToggler() { if (videoControlsToggler != null) { @@ -202,4 +205,20 @@ public class VideoplayerActivity extends MediaplayerActivity implements } } + @Override + public void onStartTrackingTouch(SeekBar seekBar) { + super.onStartTrackingTouch(seekBar); + if (videoControlsToggler != null) { + videoControlsToggler.cancel(true); + } + } + + @Override + public void onStopTrackingTouch(SeekBar seekBar) { + super.onStopTrackingTouch(seekBar); + setupVideoControlsToggler(); + } + + + } |