Skip to content

Commit

Permalink
1、修改类名
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyJingFish committed Nov 21, 2024
1 parent 9936d13 commit e8ab174
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import android.util.AttributeSet;


public class StandardOpenImageVideoPlayer extends OpenImageVideoPlayer {
public class StandardOpenImageVideoPlayer extends ScaleOpenImageVideoPlayer {


public StandardOpenImageVideoPlayer(Context context) {
Expand Down

0 comments on commit e8ab174

Please sign in to comment.