|
@@ -61,7 +61,7 @@ public class WindowPlayer extends AbsPlayer implements View.OnClickListener,
|
|
|
private long mProgress; // 当前播放进度
|
|
|
|
|
|
private long mLastClickTime; // 上次点击事件的时间
|
|
|
- private boolean mIsOpenGesture = true; // 是否开启手势
|
|
|
+ private boolean mIsOpenGesture = false; // 是否开启手势
|
|
|
private boolean isDestroy = false; // Activity 是否被销毁
|
|
|
|
|
|
public WindowPlayer(Context context) {
|
|
@@ -387,6 +387,14 @@ public class WindowPlayer extends AbsPlayer implements View.OnClickListener,
|
|
|
*/
|
|
|
@Override
|
|
|
public boolean onTouchEvent(MotionEvent event) {
|
|
|
+ if (event.getAction() == MotionEvent.ACTION_DOWN) {
|
|
|
+ if (isShowing) {
|
|
|
+ toggle(true);
|
|
|
+ } else {
|
|
|
+ toggle(false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (mIsOpenGesture && mGestureDetector != null) {
|
|
|
mGestureDetector.onTouchEvent(event);
|
|
|
}
|