From e8ab17458e8f5343aca4ea5442aae43d81ebc419 Mon Sep 17 00:00:00 2001 From: tianxiangyu <96164429+FlyJingFish@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:59:42 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E7=B1=BB=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...deoPlayer.java => ScaleOpenImageVideoPlayer.java} | 6 +++--- .../openimagefulllib/ScaleRelativeLayout.java | 12 ++++-------- .../StandardOpenImageVideoPlayer.java | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) rename OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/{OpenImageVideoPlayer.java => ScaleOpenImageVideoPlayer.java} (85%) diff --git a/OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/OpenImageVideoPlayer.java b/OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/ScaleOpenImageVideoPlayer.java similarity index 85% rename from OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/OpenImageVideoPlayer.java rename to OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/ScaleOpenImageVideoPlayer.java index 3042cef..6d30ab1 100644 --- a/OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/OpenImageVideoPlayer.java +++ b/OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/ScaleOpenImageVideoPlayer.java @@ -9,15 +9,15 @@ import com.flyjingfish.openimagelib.utils.ScreenUtils; -public class OpenImageVideoPlayer extends OpenImageCoverVideoPlayer { +public class ScaleOpenImageVideoPlayer extends OpenImageCoverVideoPlayer { private ScaleRelativeLayout scaleRelativeLayout; - public OpenImageVideoPlayer(Context context) { + public ScaleOpenImageVideoPlayer(Context context) { this(context,null); } - public OpenImageVideoPlayer(Context context, AttributeSet attrs) { + public ScaleOpenImageVideoPlayer(Context context, AttributeSet attrs) { super(context, attrs); scaleRelativeLayout = findViewById(R.id.rl_video_player_root); if (mTopContainer != null){ diff --git a/OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/ScaleRelativeLayout.java b/OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/ScaleRelativeLayout.java index 0373083..c210796 100644 --- a/OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/ScaleRelativeLayout.java +++ b/OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/ScaleRelativeLayout.java @@ -6,10 +6,6 @@ import android.graphics.RectF; import android.util.AttributeSet; import android.util.Log; -import android.view.MotionEvent; -import android.view.View; -import android.view.ViewGroup; -import android.view.ViewParent; import android.view.ViewTreeObserver; import android.widget.RelativeLayout; @@ -50,14 +46,14 @@ private void initPlayer(){ public void onGlobalLayout() { getViewTreeObserver().removeOnGlobalLayoutListener(this); gsyVideoPlayer = Util.getVideoPlayer(ScaleRelativeLayout.this); - if (gsyVideoPlayer instanceof OpenImageVideoPlayer){ - OpenImageVideoPlayer openImageVideoPlayer = (OpenImageVideoPlayer) gsyVideoPlayer; + if (gsyVideoPlayer instanceof ScaleOpenImageVideoPlayer){ + ScaleOpenImageVideoPlayer scaleOpenImageVideoPlayer = (ScaleOpenImageVideoPlayer) gsyVideoPlayer; attacher.setOnProxyTouchListener((v, event) -> { - openImageVideoPlayer.getCoverImageView().getAttacher().onTouch(ScaleRelativeLayout.this,event); + scaleOpenImageVideoPlayer.getCoverImageView().getAttacher().onTouch(ScaleRelativeLayout.this,event); return false; }); - openImageVideoPlayer.getCoverImageView().getAttacher().setOnProxyTouchListener((v, event) -> { + scaleOpenImageVideoPlayer.getCoverImageView().getAttacher().setOnProxyTouchListener((v, event) -> { attacher.onTouch(v,event); return false; }); diff --git a/OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/StandardOpenImageVideoPlayer.java b/OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/StandardOpenImageVideoPlayer.java index 14db569..9cbaa88 100644 --- a/OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/StandardOpenImageVideoPlayer.java +++ b/OpenImageFullLib/src/main/java/com/flyjingfish/openimagefulllib/StandardOpenImageVideoPlayer.java @@ -4,7 +4,7 @@ import android.util.AttributeSet; -public class StandardOpenImageVideoPlayer extends OpenImageVideoPlayer { +public class StandardOpenImageVideoPlayer extends ScaleOpenImageVideoPlayer { public StandardOpenImageVideoPlayer(Context context) {