summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/activity/VideoplayerActivity.java
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2012-08-05 15:13:50 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2012-08-05 15:13:50 +0200
commitadd5ce69d36a64c1f7dabc8262f5d5bd2a5a6715 (patch)
treef173385c57b0de6f44c1e6dd89a9000133573f37 /src/de/danoeh/antennapod/activity/VideoplayerActivity.java
parent3bcd77c0d291485f4ddc80ce20d7f6e5874b2cb6 (diff)
downloadAntennaPod-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.java21
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();
+ }
+
+
+
}