From 9690ec36df7dc603f742f543a070dea5b5a0a732 Mon Sep 17 00:00:00 2001 From: xufulong <839789740@qq.com> Date: Tue, 19 Nov 2019 01:37:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 去掉不必要参数 --- .../com/frank/ffmpeg/view/VideoPreviewBar.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/frank/ffmpeg/view/VideoPreviewBar.java b/app/src/main/java/com/frank/ffmpeg/view/VideoPreviewBar.java index 286407f..33bd3f4 100644 --- a/app/src/main/java/com/frank/ffmpeg/view/VideoPreviewBar.java +++ b/app/src/main/java/com/frank/ffmpeg/view/VideoPreviewBar.java @@ -31,17 +31,15 @@ public class VideoPreviewBar extends RelativeLayout implements HardwareDecode.On private SeekBar previewBar; - private HardwareDecode hardwareDecode; - - private int duration; - - private PreviewBarCallback mPreviewBarCallback; - private TextView txtVideoProgress; private TextView txtVideoDuration; - private boolean isShowing; + private HardwareDecode hardwareDecode; + + private PreviewBarCallback mPreviewBarCallback; + + private int duration; private int screenWidth; @@ -138,8 +136,7 @@ public class VideoPreviewBar extends RelativeLayout implements HardwareDecode.On @Override public void onStartTrackingTouch(SeekBar seekBar) { - if (!isShowing && texturePreView != null) { - isShowing = true; + if (texturePreView != null) { texturePreView.setVisibility(VISIBLE); } if (hardwareDecode != null) { @@ -149,8 +146,7 @@ public class VideoPreviewBar extends RelativeLayout implements HardwareDecode.On @Override public void onStopTrackingTouch(SeekBar seekBar) { - if (isShowing && texturePreView != null) { - isShowing = false; + if (texturePreView != null) { texturePreView.setVisibility(GONE); } if (mPreviewBarCallback != null) {